diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fdf503..4f32856 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ include(GNUInstallDirs) option(WITH_HARDENING "Enable hardening options" ON) option(WITH_TOOLS "Build library management tools" ON) -set(SAMPLER "magick" CACHE STRING "Library for sampling") +set(SIMDB_SAMPLER "magick" CACHE STRING "Library for sampling") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c99") add_definitions("-D_XOPEN_SOURCE=500") @@ -21,12 +21,12 @@ if (WITH_HARDENING) add_definitions("-D_FORTIFY_SOURCE=2") endif () -if (${SAMPLER} STREQUAL "dummy") - set(SAMPLER "dummy") -elseif (${SAMPLER} STREQUAL "random") - set(SAMPLER "random") +if (${SIMDB_SAMPLER} STREQUAL "dummy") + set(SIMDB_SAMPLER "dummy") +elseif (${SIMDB_SAMPLER} STREQUAL "random") + set(SIMDB_SAMPLER "random") else () - set(SAMPLER "magick") + set(SIMDB_SAMPLER "magick") endif () message(STATUS "Project : ${CNAME} v${VERSION}") @@ -41,7 +41,7 @@ message(STATUS "Build type : ${CMAKE_BUILD_TYPE}") message(STATUS "Options:") message(STATUS "- WITH_HARDENING : ${WITH_HARDENING}") message(STATUS "- WITH_TOOLS : ${WITH_TOOLS}") -message(STATUS "- SAMPLER : ${SAMPLER}") +message(STATUS "- SIMDB_SAMPLER : ${SIMDB_SAMPLER}") add_subdirectory("src") add_subdirectory("tests") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 551f72e..8c82f63 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -set(LIB_SOURCES "database.c" "bitmap.c" "samplers/${SAMPLER}.c") +set(LIB_SOURCES "database.c" "bitmap.c" "samplers/${SIMDB_SAMPLER}.c") add_library("simdb" SHARED ${LIB_SOURCES}) set_target_properties("simdb" PROPERTIES @@ -6,7 +6,7 @@ set_target_properties("simdb" PROPERTIES PUBLIC_HEADER "simdb.h" ) -if (${SAMPLER} STREQUAL "magick") +if (${SIMDB_SAMPLER} STREQUAL "magick") find_package(ImageMagick COMPONENTS MagickCore MagickWand) target_link_libraries("simdb" ${ImageMagick_MagickCore_LIBRARY}) target_link_libraries("simdb" ${ImageMagick_MagickWand_LIBRARY})