You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.2 KiB
31 lines
1.2 KiB
set(LIB_SOURCES "database.c" "bitmap.c" "samplers/${SIMDB_SAMPLER}.c") |
|
|
|
add_library("simdb" SHARED ${LIB_SOURCES}) |
|
set_target_properties("simdb" PROPERTIES |
|
SOVERSION ${SOVERSION} |
|
PUBLIC_HEADER "simdb.h" |
|
) |
|
|
|
if (${SIMDB_SAMPLER} STREQUAL "graphicsmagick") |
|
pkg_check_modules(MAGICK REQUIRED GraphicsMagickWand) |
|
target_include_directories("simdb" PUBLIC ${MAGICK_INCLUDE_DIRS}) |
|
target_link_libraries("simdb" ${MAGICK_LIBRARIES}) |
|
elseif (${SIMDB_SAMPLER} STREQUAL "imagemagick") |
|
pkg_check_modules(MAGICK REQUIRED MagickWand) |
|
target_include_directories("simdb" PUBLIC ${MAGICK_INCLUDE_DIRS}) |
|
target_link_libraries("simdb" ${MAGICK_LIBRARIES}) |
|
else () |
|
message(SEND_ERROR "can't find any sampler library") |
|
endif () |
|
|
|
install(TARGETS "simdb" LIBRARY DESTINATION "lib" PUBLIC_HEADER DESTINATION "include") |
|
|
|
if (WITH_TOOLS) |
|
add_executable("simdb-upgrade" "simdb-upgrade.c") |
|
install(TARGETS "simdb-upgrade" RUNTIME DESTINATION "bin") |
|
|
|
add_executable("simdb-tool" "simdb-tool.c") |
|
set_property(TARGET "simdb-tool" PROPERTY LINK_FLAGS "-Wl,--as-needed") |
|
target_link_libraries("simdb-tool" LINK_PUBLIC "simdb") |
|
install(TARGETS "simdb-tool" RUNTIME DESTINATION "bin") |
|
endif ()
|
|
|