mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 18:34:25 +01:00
Moved common code parts to static library
Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
This commit is contained in:
parent
13b0b8744a
commit
3d7b6fbe08
@ -58,7 +58,7 @@ find_package (Threads)
|
|||||||
|
|
||||||
find_package(Qt5Widgets)
|
find_package(Qt5Widgets)
|
||||||
|
|
||||||
set(DOORLOCKD_SRCS
|
set(LIBDOORLOCK_SRCS
|
||||||
src/clientmessage.cpp
|
src/clientmessage.cpp
|
||||||
src/clientmessage.h
|
src/clientmessage.h
|
||||||
src/daemon.cpp
|
src/daemon.cpp
|
||||||
@ -73,32 +73,24 @@ set(DOORLOCKD_SRCS
|
|||||||
src/response.cpp
|
src/response.cpp
|
||||||
src/response.h
|
src/response.h
|
||||||
src/util.cpp
|
src/util.cpp
|
||||||
src/util.h
|
src/util.h)
|
||||||
|
|
||||||
src/doorlockd.cpp
|
set(DOORLOCKD_SRCS
|
||||||
)
|
src/doorlockd.cpp)
|
||||||
|
|
||||||
set(DOORLOCK_CLIENT_SRCS
|
set(DOORLOCK_CLIENT_SRCS
|
||||||
src/clientmessage.cpp
|
|
||||||
src/clientmessage.h
|
|
||||||
src/logger.cpp
|
|
||||||
src/logger.h
|
|
||||||
src/response.cpp
|
|
||||||
src/response.h
|
|
||||||
src/util.cpp
|
|
||||||
src/util.h
|
|
||||||
src/qrwidget.cpp
|
src/qrwidget.cpp
|
||||||
src/qrwidget.h
|
src/qrwidget.h
|
||||||
|
src/doorlock-client.cpp)
|
||||||
|
|
||||||
src/doorlock-client.cpp
|
add_library(doorlock STATIC ${LIBDOORLOCK_SRCS})
|
||||||
)
|
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 jsoncpp ldap ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(doorlockd doorlock)
|
||||||
|
|
||||||
add_executable(doorlock-client ${DOORLOCK_CLIENT_SRCS})
|
add_executable(doorlock-client ${DOORLOCK_CLIENT_SRCS})
|
||||||
target_link_libraries(doorlock-client jsoncpp ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
|
target_link_libraries(doorlock-client doorlock qrencode Qt5::Widgets)
|
||||||
qrencode Qt5::Widgets)
|
|
||||||
|
|
||||||
install(TARGETS doorlockd DESTINATION sbin/)
|
install(TARGETS doorlockd DESTINATION sbin/)
|
||||||
install(TARGETS doorlock-client DESTINATION bin/)
|
install(TARGETS doorlock-client DESTINATION bin/)
|
||||||
|
Loading…
Reference in New Issue
Block a user