@@ -142,12 +142,6 @@ target_include_directories(
142
142
umf_headers INTERFACE $< BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /include>
143
143
$< INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} > )
144
144
145
- # Add the include directory and the headers target to the install.
146
- install (DIRECTORY "${PROJECT_SOURCE_DIR} /include/"
147
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
148
-
149
- install (TARGETS umf_headers EXPORT ${PROJECT_NAME} -targets )
150
-
151
145
if (WINDOWS )
152
146
add_compile_definitions (_CRT_SECURE_NO_WARNINGS )
153
147
# set PATH to DLLs on Windows
@@ -372,7 +366,9 @@ if(UMF_FORMAT_CODE_STYLE)
372
366
COMMENT "Format files using clang-format and cmake-format" )
373
367
endif ()
374
368
375
- # Add license to the installation path
369
+ # --------------------------------------------------------------------------- #
370
+ # Configure make install/uninstall and packages
371
+ # --------------------------------------------------------------------------- #
376
372
install (FILES ${CMAKE_SOURCE_DIR} /LICENSE.TXT
377
373
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR} /doc/${PROJECT_NAME} /" )
378
374
@@ -382,6 +378,12 @@ install(
382
378
FILES_MATCHING
383
379
PATTERN "*.c" )
384
380
381
+ # Add the include directory and the headers target to the install.
382
+ install (DIRECTORY "${PROJECT_SOURCE_DIR} /include/"
383
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
384
+
385
+ install (TARGETS umf_headers EXPORT ${PROJECT_NAME} -targets )
386
+
385
387
# Add the list of installed targets to the install. This includes the namespace
386
388
# which all installed targets will be prefixed with, e.g. for the headers target
387
389
# users will depend on ${PROJECT_NAME}::headers.
@@ -408,6 +410,7 @@ install(FILES ${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config.cmake
408
410
${PROJECT_BINARY_DIR} /cmake/${PROJECT_NAME}-config-version.cmake
409
411
DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/${PROJECT_NAME} )
410
412
413
+ # Configure uninstall commands
411
414
configure_file ("${PROJECT_SOURCE_DIR} /cmake/cmake_uninstall.cmake.in"
412
415
"${PROJECT_BINARY_DIR} /cmake_uninstall.cmake" IMMEDIATE @ONLY )
413
416
0 commit comments