Browse Source

* cmake : fixes for bsd build

master
Alex 'AdUser' Z 8 years ago
parent
commit
35eed0b1a4
  1. 7
      CMakeLists.txt
  2. 9
      src/CMakeLists.txt

7
CMakeLists.txt

@ -22,7 +22,12 @@ endif ()
include(GNUInstallDirs)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c99")
add_definitions("-D_XOPEN_SOURCE=600")
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_definitions("-D_XOPEN_SOURCE=600")
else ()
include_directories(AFTER SYSTEM "/usr/local/include")
link_directories("/usr/local/lib")
endif ()
if (WITH_HARDENING)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security -Werror=format-security" )

9
src/CMakeLists.txt

@ -8,7 +8,6 @@ if (WITH_CSOCKET)
endif ()
add_executable("f2b" ${SOURCES})
target_link_libraries(f2b "dl")
install(TARGETS "f2b" RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
@ -20,11 +19,15 @@ endif ()
set(SOURCES "strlcpy.c" "backend-test.c" "log.c" "config.c" "backend.c")
add_executable("backend-test" ${SOURCES})
target_link_libraries("backend-test" "dl")
set(SOURCES "strlcpy.c" "filter-test.c" "log.c" "config.c" "filter.c")
add_executable("filter-test" ${SOURCES})
target_link_libraries("filter-test" "dl")
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries(f2b "dl")
target_link_libraries("backend-test" "dl")
target_link_libraries("filter-test" "dl")
endif ()
add_subdirectory("backends")
add_subdirectory("filters")

Loading…
Cancel
Save