include (CPack)\r
\r
# configuration files\r
-export (TARGETS ${nlopt_lib} FILE ${PROJECT_BINARY_DIR}/NLoptLibraryDepends.cmake)\r
+export (TARGETS ${nlopt_lib} NAMESPACE NLopt:: FILE ${PROJECT_BINARY_DIR}/NLoptLibraryDepends.cmake)\r
\r
# Install the export set for use with the install-tree\r
install(EXPORT NLoptLibraryDepends\r
+ NAMESPACE NLopt::\r
DESTINATION ${RELATIVE_INSTALL_CMAKE_DIR}\r
COMPONENT Development)\r
\r
# Create a NLOPTConfig.cmake file for the use from the install tree\r
# and install it\r
-set (NLOPT_LIBRARIES ${nlopt_lib})\r
+set (NLOPT_LIBRARIES "NLopt::${nlopt_lib}")\r
\r
set (NLOPT_CMAKE_DIR "${INSTALL_CMAKE_DIR}")\r
file (RELATIVE_PATH rel_include_dir "${NLOPT_CMAKE_DIR}" "${INSTALL_INCLUDE_DIR}")\r