Mercurial > malikania
changeset 155:f67c187bfceb
CMake: use Boost imported targets
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 13 Dec 2017 16:35:19 +0100 |
parents | 614ac46dac3e |
children | ca125345a9cf |
files | libclient/CMakeLists.txt libcommon/CMakeLists.txt |
diffstat | 2 files changed, 19 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libclient/CMakeLists.txt Wed Dec 13 13:48:56 2017 +0100 +++ b/libclient/CMakeLists.txt Wed Dec 13 16:35:19 2017 +0100 @@ -18,6 +18,8 @@ project(libmlk-client) +find_package(Boost REQUIRED COMPONENTS timer) + set( HEADERS ${libmlk-client_SOURCE_DIR}/malikania/client/animation.hpp @@ -111,5 +113,11 @@ $<BUILD_INTERFACE:${libmlk-client_SOURCE_DIR}/malikania/client/${WITH_BACKEND_DIR}> $<BUILD_INTERFACE:${libmlk-client_SOURCE_DIR}/malikania> ${INCLUDES} - LIBRARIES libmlk-common OpenSSL::SSL OpenSSL::Crypto ${LIBRARIES} + LIBRARIES + libmlk-common + Boost::boost + Boost::timer + OpenSSL::SSL + OpenSSL::Crypto + ${LIBRARIES} )
--- a/libcommon/CMakeLists.txt Wed Dec 13 13:48:56 2017 +0100 +++ b/libcommon/CMakeLists.txt Wed Dec 13 16:35:19 2017 +0100 @@ -18,12 +18,16 @@ project(libmlk-common) +find_package(Boost REQUIRED filesystem system) +find_package(OpenSSL REQUIRED) + set( HEADERS ${libmlk-common_SOURCE_DIR}/malikania/game.hpp ${libmlk-common_SOURCE_DIR}/malikania/id.hpp ${libmlk-common_SOURCE_DIR}/malikania/loader.hpp ${libmlk-common_SOURCE_DIR}/malikania/locator.hpp + ${libmlk-common_SOURCE_DIR}/malikania/network_stream.hpp ${libmlk-common_SOURCE_DIR}/malikania/size.hpp ${libmlk-common_SOURCE_DIR}/malikania/tileset.hpp ${libmlk-common_SOURCE_DIR}/malikania/unicode.hpp @@ -35,6 +39,7 @@ SOURCES ${libmlk-common_SOURCE_DIR}/malikania/loader.cpp ${libmlk-common_SOURCE_DIR}/malikania/locator.cpp + ${libmlk-common_SOURCE_DIR}/malikania/network_stream.cpp ${libmlk-common_SOURCE_DIR}/malikania/unicode.cpp ${libmlk-common_SOURCE_DIR}/malikania/util.cpp ) @@ -48,22 +53,21 @@ list(APPEND LIBRARIES ${SDL2_LIBRARIES}) endif () -if (WIN32) - list(APPEND LIBRARIES ws2_32) -endif () - malikania_define_library( PROJECT libmlk-common TARGET libmlk-common SOURCES ${HEADERS} ${SOURCES} FLAGS "MALIKANIA_COMMON_BUILD" PUBLIC_INCLUDES - ${Boost_INCLUDE_DIRS} ${INCLUDES} $<BUILD_INTERFACE:${libmlk-common_SOURCE_DIR}/malikania> $<BUILD_INTERFACE:${libmlk-common_SOURCE_DIR}> LIBRARIES + Boost::boost + Boost::filesystem + Boost::system + OpenSSL::Crypto + OpenSSL::SSL json - ${Boost_LIBRARIES} ${LIBRARIES} )