From 101c69f5d4819e7445f8645456e744e14aaa2dd6 Mon Sep 17 00:00:00 2001 From: Markus Rickert Date: Sun, 10 Sep 2017 04:16:02 +0200 Subject: [PATCH] Fix dllexport and dllimport for Windows (#140) --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4996bb3..2795c0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -239,8 +239,8 @@ get_target_property (NLOPT_PRIVATE_INCLUDE_DIRS ${nlopt_lib} INCLUDE_DIRECTORIES target_include_directories (${nlopt_lib} INTERFACE "$") if (BUILD_SHARED_LIBS) - target_compile_definitions (${nlopt_lib} INTERFACE -DNLOPT_DLL) - target_compile_definitions (${nlopt_lib} INTERFACE -DNLOPT_DLL_EXPORT) + target_compile_definitions (${nlopt_lib} PUBLIC -DNLOPT_DLL) + target_compile_definitions (${nlopt_lib} PRIVATE -DNLOPT_DLL_EXPORT) endif () # pass -fPIC in case swig module is built with static library -- 2.30.2