1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-10-31 22:47:05 +01:00

Fix boost include bug

Signed-off-by: Andreas Augustin <andy.augustin@t-online.de>
Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
This commit is contained in:
Andreas Augustin 2016-04-12 16:06:04 +02:00 committed by Ralf Ramsauer
parent 61c5ce5e5e
commit b15e7960cb

View File

@ -54,9 +54,6 @@ configure_file (
"${PROJECT_BINARY_DIR}/config.h" "${PROJECT_BINARY_DIR}/config.h"
) )
include_directories(${PROJECT_BINARY_DIR})
include_directories(${Boost_INCLUDE_DIRS})
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb -Wall -pedantic -Weffc++ -Wextra") set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb -Wall -pedantic -Weffc++ -Wextra")
set(CMAKE_CXX_FLAGS "-O2 -Wall -pedantic -Wextra -Weffc++") set(CMAKE_CXX_FLAGS "-O2 -Wall -pedantic -Wextra -Weffc++")
set(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb -Wall -pedantic -Wextra") set(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb -Wall -pedantic -Wextra")
@ -65,13 +62,17 @@ set(CMAKE_C_FLAGS "-O2 -Wall -pedantic -Wextra")
find_package(Boost 1.55.0 COMPONENTS program_options system REQUIRED) find_package(Boost 1.55.0 COMPONENTS program_options system REQUIRED)
set(JSON_INCLUDE_DIR "/usr/include/jsoncpp" CACHE PATH "path to jsoncpp includes") set(JSON_INCLUDE_DIR "/usr/include/jsoncpp" CACHE PATH "path to jsoncpp includes")
include_directories(${JSON_INCLUDE_DIR})
find_package (Threads) find_package (Threads)
find_package(Qt5Widgets) find_package(Qt5Widgets)
set(LIBDOORLOCK_SRCS include_directories(
${Boost_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}
${JSON_INCLUDE_DIR})
set(_LIBDOORLOCK_SRCS
lib/clientmessage.cpp lib/clientmessage.cpp
lib/clientmessage.h lib/clientmessage.h
lib/door.cpp lib/door.cpp
@ -89,10 +90,10 @@ set(LIBDOORLOCK_SRCS
lib/util.cpp lib/util.cpp
lib/util.h) lib/util.h)
set(DOORLOCKD_SRCS set(_DOORLOCKD_SRCS
daemon/doorlockd.cpp) daemon/doorlockd.cpp)
set(DOORLOCK_CLIENT_SRCS set(_DOORLOCK_CLIENT_SRCS
client/qrwidget.cpp client/qrwidget.cpp
client/qrwidget.h client/qrwidget.h
client/doorlock-client.cpp client/doorlock-client.cpp
@ -102,16 +103,21 @@ set(DOORLOCK_CLIENT_SRCS
client/wave.h client/wave.h
client/wave.cpp) client/wave.cpp)
add_library(doorlock STATIC ${LIBDOORLOCK_SRCS}) add_library(doorlock STATIC ${_LIBDOORLOCK_SRCS})
target_link_libraries(doorlock jsoncpp ldap ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(doorlock jsoncpp ldap ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
add_executable(doorlockd ${DOORLOCKD_SRCS}) add_executable(doorlockd ${_DOORLOCKD_SRCS})
target_link_libraries(doorlockd doorlock) target_link_libraries(doorlockd doorlock)
add_executable(doorlock-client ${DOORLOCK_CLIENT_SRCS}) add_executable(doorlock-client ${_DOORLOCK_CLIENT_SRCS})
target_link_libraries(doorlock-client doorlock qrencode ao sndfile Qt5::Widgets) target_link_libraries(doorlock-client doorlock qrencode ao sndfile Qt5::Widgets)
target_include_directories(doorlock-client PRIVATE ${CMAKE_SOURCE_DIR}) target_include_directories(doorlock-client PRIVATE ${CMAKE_SOURCE_DIR})
mark_as_advanced(
_LIBDOORLOCK_SRCS
_DOORLOCKD_SRCS
_DOORLOCK_CLIENT_SRCS)
install(TARGETS doorlockd DESTINATION sbin/) install(TARGETS doorlockd DESTINATION sbin/)
install(TARGETS doorlock-client DESTINATION bin/) install(TARGETS doorlock-client DESTINATION bin/)