@@ -145,12 +145,6 @@ target_include_directories(
145
145
umf_headers INTERFACE $< BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /include>
146
146
$< INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} > )
147
147
148
- # Add the include directory and the headers target to the install.
149
- install (DIRECTORY "${PROJECT_SOURCE_DIR} /include/"
150
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
151
-
152
- install (TARGETS umf_headers EXPORT ${PROJECT_NAME} -targets )
153
-
154
148
if (WINDOWS )
155
149
add_compile_definitions (_CRT_SECURE_NO_WARNINGS )
156
150
# set PATH to DLLs on Windows
@@ -375,13 +369,21 @@ if(UMF_FORMAT_CODE_STYLE)
375
369
COMMENT "Format files using clang-format and cmake-format" )
376
370
endif ()
377
371
378
- # Add license to the installation path
372
+ # --------------------------------------------------------------------------- #
373
+ # Configure make install/uninstall and packages
374
+ # --------------------------------------------------------------------------- #
379
375
install (FILES ${CMAKE_SOURCE_DIR} /LICENSE.TXT
380
376
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR} /doc/${PROJECT_NAME} /" )
381
377
382
378
install (FILES examples/basic/basic.c
383
379
DESTINATION "${CMAKE_INSTALL_DOCDIR} /examples" )
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