From e7507515b672b5c395c037b0ec6c2e5abc043b66 Mon Sep 17 00:00:00 2001 From: mordred Date: Wed, 2 Jan 2019 11:23:39 +0100 Subject: [PATCH] Further cmake cleanup --- CMakeLists.txt | 5 ++--- src/api/CMakeLists.txt | 6 ------ src/common/CMakeLists.txt | 25 ++++++++----------------- src/lobby/CMakeLists.txt | 10 +--------- src/world/CMakeLists.txt | 7 +------ 5 files changed, 12 insertions(+), 41 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 21fdc195..bdbfa716 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,17 +39,16 @@ add_subdirectory( "deps/zlib" ) add_subdirectory( "deps/MySQL" ) add_subdirectory( "deps/datReader" ) add_subdirectory( "deps/mysqlConnector" ) -add_subdirectory( "src/common" ) - ############################## # Main Sapphire Components # ############################## +add_subdirectory( "src/common" ) add_subdirectory( "src/api" ) add_subdirectory( "src/lobby" ) add_subdirectory( "src/world" ) -add_subdirectory( "src/dbm" ) add_subdirectory( "src/scripts" ) +add_subdirectory( "src/dbm" ) ############################## # Tools # diff --git a/src/api/CMakeLists.txt b/src/api/CMakeLists.txt index 83279c18..1b9ca308 100644 --- a/src/api/CMakeLists.txt +++ b/src/api/CMakeLists.txt @@ -8,9 +8,3 @@ file( GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*" ) add_executable( api ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES} ) target_link_libraries( api common ) -if( UNIX ) - target_link_libraries( api mysqlclient stdc++fs ) - -else() - target_link_libraries( api mysql ) -endif() diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 00f863c9..a774e3cc 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -17,25 +17,16 @@ set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) add_library( common ${UTILS_PUBLIC_INCLUDE_FILES} ${UTILS_SOURCE_FILES} ) -set_target_properties( common PROPERTIES - RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" -) - -target_link_libraries( common PUBLIC xivdat ) - -target_link_libraries( common PUBLIC mysqlConnector ) +target_link_libraries( common + PUBLIC + xivdat + mysqlConnector + mysql ) if( UNIX ) - - target_link_libraries( common PUBLIC mysqlclient ) - target_link_libraries( common PUBLIC pthread ) - -else() - target_link_libraries( common + target_link_libraries( common PUBLIC - mysql ) + pthread + stdc++fs ) endif() target_include_directories( common diff --git a/src/lobby/CMakeLists.txt b/src/lobby/CMakeLists.txt index ce70e468..cba809cf 100644 --- a/src/lobby/CMakeLists.txt +++ b/src/lobby/CMakeLists.txt @@ -10,13 +10,5 @@ add_executable( lobby ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES} ) target_link_libraries( lobby PRIVATE - common - mysql ) -if( UNIX ) - target_link_libraries( lobby - PRIVATE - stdc++fs ) - -endif() - + common ) #cotire( lobby ) diff --git a/src/world/CMakeLists.txt b/src/world/CMakeLists.txt index 3c223058..7d25aae6 100644 --- a/src/world/CMakeLists.txt +++ b/src/world/CMakeLists.txt @@ -26,9 +26,7 @@ add_executable( world ${SERVER_SOURCE_FILES} ) set_target_properties( world PROPERTIES ENABLE_EXPORTS ON - WINDOWS_EXPORT_ALL_SYMBOLS ON -) - + WINDOWS_EXPORT_ALL_SYMBOLS ON ) target_link_libraries( world PUBLIC @@ -40,7 +38,4 @@ target_include_directories( world if( UNIX ) cotire( world ) - target_link_libraries( world PUBLIC stdc++fs ) -else() - target_link_libraries( world PUBLIC mysql ) endif()