chiark / gitweb /
Merge pull request #137 from jschueller/bounds
[nlopt.git] / CMakeLists.txt
index 4996bb3de0bc917848b6647a5351b86460dad4be..2795c0cd4dc997ff0ad78ae5bccd5d5b9e69ab09 100644 (file)
@@ -239,8 +239,8 @@ get_target_property (NLOPT_PRIVATE_INCLUDE_DIRS ${nlopt_lib} INCLUDE_DIRECTORIES
 target_include_directories (${nlopt_lib} INTERFACE "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/api>")\r
 \r
 if (BUILD_SHARED_LIBS)\r
-  target_compile_definitions (${nlopt_lib} INTERFACE -DNLOPT_DLL)\r
-  target_compile_definitions (${nlopt_lib} INTERFACE -DNLOPT_DLL_EXPORT)\r
+  target_compile_definitions (${nlopt_lib} PUBLIC -DNLOPT_DLL)\r
+  target_compile_definitions (${nlopt_lib} PRIVATE -DNLOPT_DLL_EXPORT)\r
 endif ()\r
 \r
 # pass -fPIC in case swig module is built with static library\r