From 5fe83abbe57c9c640bbfc506f0e879c2ae4f81a9 Mon Sep 17 00:00:00 2001 From: Naios Date: Mon, 14 Mar 2016 16:52:27 +0100 Subject: CMake: Use inherited dependencies in database, shared and game (cherry picked from commit 469f2d3ade168de0b5be18112008c337067a8e03) --- src/server/ipc/CMakeLists.txt | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'src/server/ipc') diff --git a/src/server/ipc/CMakeLists.txt b/src/server/ipc/CMakeLists.txt index 2a865229af8..8469c922066 100644 --- a/src/server/ipc/CMakeLists.txt +++ b/src/server/ipc/CMakeLists.txt @@ -8,18 +8,26 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -file(GLOB_RECURSE sources_ipc *.cpp *.h) +CollectSourceFiles( + ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE_SOURCES) -set(ipc_SRCS - ${sources_ipc} -) +GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) -include_directories( - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/dep/zmqpp - ${CMAKE_SOURCE_DIR}/src/common - ${CMAKE_SOURCE_DIR}/src/server/shared - ${ZMQ_INCLUDE_DIR} -) +add_library(ipc ${PRIVATE_SOURCES}) -add_library(ipc STATIC ${ipc_SRCS}) +target_include_directories(ipc + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE + ${CMAKE_CURRENT_BINARY_DIR}) + +target_link_libraries(ipc + PUBLIC + shared + zmqpp) + +set_target_properties(ipc + PROPERTIES + FOLDER + "server") -- cgit v1.2.3