12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- cmake_minimum_required(VERSION 2.6)
- #{{{ Sources
- set(ufofilter_SRCS
- ufo-anka-backproject-task.c
- ufo-remove-stripes-task.c
- )
- set(laminoaux_SRCS
- lamino-roi.c)
- #}}}
- #{{{ Variables
- if (CMAKE_COMPILER_IS_GNUCC OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang"))
- add_definitions("-Wcast-align -Wcast-qual -Winline -Wmissing-declarations "
- "-Wmissing-prototypes -Wnested-externs -Wno-long-long "
- "-Wno-missing-field-initializers -Wpointer-arith "
- "-Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings")
- endif()
- add_definitions ("-DBURST=${BP_BURST}")
- #}}}
- #{{{ Plugin targets
- include_directories(${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${OPENCL_INCLUDE_DIRS}
- ${UFO_INCLUDE_DIRS})
- foreach(_src ${ufofilter_SRCS})
- # find plugin suffix
- string(REGEX REPLACE "ufo-([^ \\.]+)-task.*" "\\1" task "${_src}")
- # build string to get miscalleanous sources
- string(REPLACE "-" "_" _misc ${task})
- string(TOUPPER ${_misc} _misc_upper)
- # create an option name and add this to disable filters
- set(target_option "ENABLE_${_misc_upper}")
- option(${target_option} "Build filter ${task}" ON)
- if (${target_option})
- set(_misc "${_misc}_misc_SRCS")
- string(REPLACE "-" "" _targetname ${task})
- set(target "ufofilter${_targetname}")
- # build single shared library per filter
- if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- add_library(${target} MODULE ${laminoaux_SRCS} ${_src} ${${_misc}})
- else()
- add_library(${target} SHARED ${laminoaux_SRCS} ${_src} ${${_misc}})
- endif()
- target_link_libraries(${target} ${ufofilter_LIBS})
- list(APPEND all_targets ${target})
-
- install(TARGETS ${target}
- ARCHIVE DESTINATION ${UFO_ANKAFILTERS_PLUGINDIR}
- LIBRARY DESTINATION ${UFO_ANKAFILTERS_PLUGINDIR})
- endif()
- endforeach()
- #}}}
- #{{{ Subdirectories
- add_subdirectory(kernels)
- #}}}
|