Browse Source

* rename variable

master
Alex 'AdUser' Z 8 years ago
parent
commit
b40b3c86c9
  1. 14
      CMakeLists.txt
  2. 4
      src/CMakeLists.txt

14
CMakeLists.txt

@ -10,7 +10,7 @@ include(GNUInstallDirs)
option(WITH_HARDENING "Enable hardening options" ON) option(WITH_HARDENING "Enable hardening options" ON)
option(WITH_TOOLS "Build library management tools" 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") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c99")
add_definitions("-D_XOPEN_SOURCE=500") add_definitions("-D_XOPEN_SOURCE=500")
@ -21,12 +21,12 @@ if (WITH_HARDENING)
add_definitions("-D_FORTIFY_SOURCE=2") add_definitions("-D_FORTIFY_SOURCE=2")
endif () endif ()
if (${SAMPLER} STREQUAL "dummy") if (${SIMDB_SAMPLER} STREQUAL "dummy")
set(SAMPLER "dummy") set(SIMDB_SAMPLER "dummy")
elseif (${SAMPLER} STREQUAL "random") elseif (${SIMDB_SAMPLER} STREQUAL "random")
set(SAMPLER "random") set(SIMDB_SAMPLER "random")
else () else ()
set(SAMPLER "magick") set(SIMDB_SAMPLER "magick")
endif () endif ()
message(STATUS "Project : ${CNAME} v${VERSION}") message(STATUS "Project : ${CNAME} v${VERSION}")
@ -41,7 +41,7 @@ message(STATUS "Build type : ${CMAKE_BUILD_TYPE}")
message(STATUS "Options:") message(STATUS "Options:")
message(STATUS "- WITH_HARDENING : ${WITH_HARDENING}") message(STATUS "- WITH_HARDENING : ${WITH_HARDENING}")
message(STATUS "- WITH_TOOLS : ${WITH_TOOLS}") message(STATUS "- WITH_TOOLS : ${WITH_TOOLS}")
message(STATUS "- SAMPLER : ${SAMPLER}") message(STATUS "- SIMDB_SAMPLER : ${SIMDB_SAMPLER}")
add_subdirectory("src") add_subdirectory("src")
add_subdirectory("tests") add_subdirectory("tests")

4
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}) add_library("simdb" SHARED ${LIB_SOURCES})
set_target_properties("simdb" PROPERTIES set_target_properties("simdb" PROPERTIES
@ -6,7 +6,7 @@ set_target_properties("simdb" PROPERTIES
PUBLIC_HEADER "simdb.h" PUBLIC_HEADER "simdb.h"
) )
if (${SAMPLER} STREQUAL "magick") if (${SIMDB_SAMPLER} STREQUAL "magick")
find_package(ImageMagick COMPONENTS MagickCore MagickWand) find_package(ImageMagick COMPONENTS MagickCore MagickWand)
target_link_libraries("simdb" ${ImageMagick_MagickCore_LIBRARY}) target_link_libraries("simdb" ${ImageMagick_MagickCore_LIBRARY})
target_link_libraries("simdb" ${ImageMagick_MagickWand_LIBRARY}) target_link_libraries("simdb" ${ImageMagick_MagickWand_LIBRARY})

Loading…
Cancel
Save