@@ -160,39 +160,39 @@ enable_testing()
160
160
161
161
install (DIRECTORY boost DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
162
162
163
- # # ##
164
- # # # Export Targets
165
- # # (so cpp-netlib can be easily used by other CMake projects)
166
- # # [see http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file]
167
- #
168
- # # Add all targets to the build-tree export set
169
- # export(TARGETS cppnetlib-client-connections cppnetlib-server-parsers cppnetlib-uri
170
- # FILE "${PROJECT_BINARY_DIR}/cppnetlibTargets.cmake")
171
- # # Export the package for use from the build-tree
172
- # # (this registers the build-tree with a global CMake-registry)
173
- # export(PACKAGE cppnetlib)
174
- # # Create the cppnetlibConfig.cmake and cppnetlibConfigVersion files
175
- # file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}"
176
- # "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
177
- # # ... for the build tree
178
- # set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}" ${Boost_INCLUDE_DIRS})
179
- # configure_file(cppnetlibConfig.cmake.in
180
- # "${PROJECT_BINARY_DIR}/cppnetlibConfig.cmake" @ONLY)
181
- # # ... for the install tree
182
- # set(CONF_INCLUDE_DIRS "\${CPPNETLIB_CMAKE_DIR}/${REL_INCLUDE_DIR}")
183
- # set(CONF_INCLUDE_DIRS ${CONF_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
184
- # configure_file(cppnetlibConfig.cmake.in
185
- # "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cppnetlibConfig.cmake" @ONLY)
186
- # # ... for both
187
- # configure_file(cppnetlibConfigVersion.cmake.in
188
- # "${PROJECT_BINARY_DIR}/cppnetlibConfigVersion.cmake" @ONLY)
189
- # # Install the cppnetlibConfig.cmake and cppnetlibConfigVersion.cmake
190
- # install(FILES
191
- # "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cppnetlibConfig.cmake"
192
- # "${PROJECT_BINARY_DIR}/cppnetlibConfigVersion.cmake"
193
- # DESTINATION "${INSTALL_CMAKE_DIR}"
194
- # COMPONENT dev)
195
- # # Install the export set for use with the install-tree
196
- # install(EXPORT cppnetlibTargets
197
- # DESTINATION "${INSTALL_CMAKE_DIR}"
198
- # COMPONENT dev)
163
+ ###
164
+ ## Export Targets
165
+ # (so cpp-netlib can be easily used by other CMake projects)
166
+ # [see http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file]
167
+
168
+ # Add all targets to the build-tree export set
169
+ export (TARGETS cppnetlib-client-connections cppnetlib-server-parsers cppnetlib-uri
170
+ FILE "${PROJECT_BINARY_DIR} /cppnetlibTargets.cmake" )
171
+ # Export the package for use from the build-tree
172
+ # (this registers the build-tree with a global CMake-registry)
173
+ export (PACKAGE cppnetlib )
174
+ # Create the cppnetlibConfig.cmake and cppnetlibConfigVersion files
175
+ file (RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR} "
176
+ "${CMAKE_INSTALL_FULL_INCLUDEDIR} " )
177
+ # ... for the build tree
178
+ set (CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR} " ${Boost_INCLUDE_DIRS} )
179
+ configure_file (cppnetlibConfig.cmake.in
180
+ "${PROJECT_BINARY_DIR} /cppnetlibConfig.cmake" @ONLY )
181
+ # ... for the install tree
182
+ set (CONF_INCLUDE_DIRS "\$ {CPPNETLIB_CMAKE_DIR}/${REL_INCLUDE_DIR} " )
183
+ set (CONF_INCLUDE_DIRS ${CONF_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} )
184
+ configure_file (cppnetlibConfig.cmake.in
185
+ "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY} /cppnetlibConfig.cmake" @ONLY )
186
+ # ... for both
187
+ configure_file (cppnetlibConfigVersion.cmake.in
188
+ "${PROJECT_BINARY_DIR} /cppnetlibConfigVersion.cmake" @ONLY )
189
+ # Install the cppnetlibConfig.cmake and cppnetlibConfigVersion.cmake
190
+ install (FILES
191
+ "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY} /cppnetlibConfig.cmake"
192
+ "${PROJECT_BINARY_DIR} /cppnetlibConfigVersion.cmake"
193
+ DESTINATION "${INSTALL_CMAKE_DIR} "
194
+ COMPONENT dev )
195
+ # Install the export set for use with the install-tree
196
+ install (EXPORT cppnetlibTargets
197
+ DESTINATION "${INSTALL_CMAKE_DIR} "
198
+ COMPONENT dev )
0 commit comments