diff --git a/cmake/OssiaConfiguration.cmake b/cmake/OssiaConfiguration.cmake index 329944851c1..a1823b915a4 100644 --- a/cmake/OssiaConfiguration.cmake +++ b/cmake/OssiaConfiguration.cmake @@ -184,12 +184,12 @@ else() if(CMAKE_COMPILER_IS_GNUCXX) set(OSSIA_LINK_OPTIONS ${OSSIA_LINK_OPTIONS} - -fvar-tracking-assignments + $ ) # Note: this may fail with -gsplit-dwarf set(OSSIA_LINK_OPTIONS ${OSSIA_LINK_OPTIONS} - -Wl,-Bsymbolic-functions + $ ) endif() diff --git a/cmake/ossiaConfig.cmake.in b/cmake/ossiaConfig.cmake.in index 4c4137cac61..c4b4ebe366d 100644 --- a/cmake/ossiaConfig.cmake.in +++ b/cmake/ossiaConfig.cmake.in @@ -2,9 +2,15 @@ include(CMakeFindDependencyMacro) get_filename_component(OSSIA_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -list(APPEND CMAKE_MODULE_PATH ${OSSIA_CMAKE_DIR}) +list(APPEND CMAKE_MODULE_PATH "${OSSIA_CMAKE_DIR}") find_dependency(Boost 1.83 REQUIRED) +if(@OSSIA_STATIC@) + if(EXISTS "${OSSIA_CMAKE_DIR}/../re2/re2-exports.cmake") + include("${OSSIA_CMAKE_DIR}/../re2/re2-exports.cmake") + endif() +endif() + list(REMOVE_AT CMAKE_MODULE_PATH -1) if(NOT TARGET ossia::ossia) @@ -30,4 +36,10 @@ target_compile_definitions(ossia::ossia INTERFACE SPDLOG_DEBUG_ON=1 SPDLOG_TRACE_ON=1 ) + +if(@OSSIA_STATIC@) + if(TARGET re2) + target_link_libraries(ossia::ossia INTERFACE re2) + endif() +endif() endif()