From: Markus Rickert Date: Sun, 10 Sep 2017 02:16:02 +0000 (+0200) Subject: Fix dllexport and dllimport for Windows (#140) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=101c69f5d4819e7445f8645456e744e14aaa2dd6;p=nlopt.git Fix dllexport and dllimport for Windows (#140) --- 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