From 3b39b87c34380a0f396c1c4538d8ec349f40a1ff Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Mon, 25 Nov 2024 20:11:09 +0000 Subject: [PATCH] Export symbols on windows --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f144e88..c8783247 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,11 +7,16 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") endif() if(WIN32) - # Enable Math Constants - # https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=vs-2019 add_compile_definitions( + # For math constants + # https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=vs-2019 _USE_MATH_DEFINES + # Minimize Windows namespace collision + NOMINMAX + WIN32_LEAN_AND_MEAN ) + # set the same behavior for windows as it is on linux + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() set(THIS_PACKAGE_INCLUDE_DEPENDS