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