Commit 428ebfa7 authored by Max Lyon's avatar Max Lyon

Merge branch 'cgg-cmake' into 'master'

Some CMake improvements

See merge request !8
parents 0d07b411 2013d7a4
Pipeline #15322 passed with stage
in 6 minutes and 44 seconds
......@@ -59,8 +59,8 @@ link_directories (${CMAKE_BINARY_DIR} ${LIBRARY_DIRS} )
add_library (HexEx SHARED ${SOURCES})
add_library (HexExStatic STATIC ${SOURCES})
target_link_libraries (HexEx ${LIBRARIES})
target_link_libraries (HexExStatic ${LIBRARIES})
target_link_libraries (HexEx ${LIBRARIES} OpenVolumeMesh)
target_link_libraries (HexExStatic ${LIBRARIES} OpenVolumeMesh)
#
# In order for the exact predicates to work the compiler
......@@ -108,12 +108,24 @@ set_target_properties (HexEx
CXX_STANDARD 11
)
target_include_directories(HexEx
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_include_directories(HexExStatic
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
set_target_properties (HexExStatic
PROPERTIES
COMPILE_FLAGS "${HEXEX_COMPILE_FLAGS}"
DEFINE_SYMBOLS "-DHEXEX_EXPORT_SYMBOLS"
CXX_STANDARD 11
)
set_property(TARGET HexExStatic PROPERTY POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
......@@ -154,3 +166,5 @@ endif()
# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
# COMMENT "Generating Doxygen documentation" VERBATIM)
#endif()
list(REMOVE_AT CMAKE_MODULE_PATH -1)
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