diff --git a/pal_statistics/CMakeLists.txt b/pal_statistics/CMakeLists.txt index cf4a755..c693829 100644 --- a/pal_statistics/CMakeLists.txt +++ b/pal_statistics/CMakeLists.txt @@ -4,9 +4,24 @@ project(pal_statistics) find_package(ament_cmake_auto REQUIRED) ament_auto_find_build_dependencies() +if(WIN32) + # set the same behavior for windows as it is on linux + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + + find_package(Boost QUIET COMPONENTS headers) + if(NOT Boost_headers_FOUND) + find_package(Boost REQUIRED) + endif() +endif() + ament_auto_add_library(${PROJECT_NAME} SHARED src/pal_statistics_utils.cpp src/pal_statistics.cpp src/pal_statistics_macros.cpp src/registration_list.cpp) +if(WIN32) + target_link_libraries(${PROJECT_NAME} + Boost::boost + ) +endif() # ############################################################################## # Testing ## @@ -33,4 +48,5 @@ endif() # Install Python modules ament_python_install_package(${PROJECT_NAME}) +ament_export_dependencies(Boost) ament_auto_package()