Commit db667c3a authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] sync submodule and its use

parent 7184c0fc
......@@ -29,8 +29,7 @@ COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX C)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
# Search for Boost.
SET(BOOST_COMPONENTS filesystem system serialization)
SEARCH_FOR_BOOST()
ADD_PROJECT_DEPENDENCY(Boost REQUIRED COMPONENTS filesystem serialization)
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/find-external/TinyXML)
FIND_PACKAGE(TinyXML REQUIRED)
......@@ -64,9 +63,9 @@ SET(${PROJECT_NAME}_SOURCES
)
ADD_LIBRARY(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PRIVATE ${TinyXML_INCLUDE_DIR} ${Boost_INCLUDE_DIRS})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PRIVATE ${TinyXML_INCLUDE_DIR})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${TinyXML_LIBRARY} ${Boost_LIBRARIES})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${TinyXML_LIBRARY} Boost::filesystem Boost::serialization)
# Check for unistd.h presence.
INCLUDE(CheckIncludeFiles)
......@@ -86,4 +85,3 @@ INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib)
ADD_SUBDIRECTORY(tests)
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
PKG_CONFIG_APPEND_BOOST_LIBS(${BOOST_COMPONENTS})
Subproject commit 064b1bd208653a8a4eb59cca86786c50b34cc8b9
Subproject commit 32015cb28d977b592227675665d17d11531ef418
......@@ -20,7 +20,6 @@
#
MACRO(DEFINE_TEST NAME)
ADD_UNIT_TEST(${NAME} ${NAME}.cc)
TARGET_INCLUDE_DIRECTORIES(${NAME} PRIVATE ${Boost_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(${NAME} ${PROJECT_NAME})
ENDMACRO(DEFINE_TEST)
......@@ -32,12 +31,10 @@ DEFINE_TEST(exception-factory)
DEFINE_TEST(timer)
ADD_UNIT_TEST(serialization serialization.cc serialization-test.cc)
TARGET_INCLUDE_DIRECTORIES(serialization PRIVATE ${Boost_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(serialization ${PROJECT_NAME})
SET(HPP_LOGGINGDIR "${CMAKE_CURRENT_BINARY_DIR}")
CONFIG_FILES(run_debug.sh)
ADD_EXECUTABLE(debug debug.cc)
TARGET_INCLUDE_DIRECTORIES(debug PRIVATE ${Boost_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(debug ${PROJECT_NAME})
ADD_TEST(NAME debug COMMAND ${RUNTIME_OUTPUT_DIRECTORY}/run_debug.sh)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment