summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-install.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-10-27 12:51:49 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-10-27 12:51:49 +0200
commit841d3b28d6bda2fca3275ade618c28627b0565c2 (patch)
tree7df9c73e92a3b17a882ef972dee070bb6d089824 /cmake/opentrack-install.cmake
parentefbfb1fa5bd5d3331587404f2fe2c853af95899d (diff)
cmake: cleanup
Don't install any source code components.
Diffstat (limited to 'cmake/opentrack-install.cmake')
-rw-r--r--cmake/opentrack-install.cmake56
1 files changed, 29 insertions, 27 deletions
diff --git a/cmake/opentrack-install.cmake b/cmake/opentrack-install.cmake
index 45f6ce18..d15951e9 100644
--- a/cmake/opentrack-install.cmake
+++ b/cmake/opentrack-install.cmake
@@ -14,32 +14,35 @@ macro(otr_install_dir path)
)
endmacro()
+function(otr_setup_refresh_install_dir)
+ if((NOT CMAKE_INSTALL_PREFIX STREQUAL "") AND (NOT opentrack-doc-src-pfx STREQUAL ""))
+ otr_escape_string(dir "${CMAKE_INSTALL_PREFIX}/${opentrack-doc-src-pfx}/")
+ install(CODE "file(REMOVE_RECURSE \"${dir}\")")
+ endif()
+endfunction()
+
function(install_sources)
- if(FALSE)
- otr_setup_refresh_install_dir()
- get_property(source-dirs GLOBAL PROPERTY opentrack-all-source-dirs)
- foreach(k ${source-dirs})
- file(RELATIVE_PATH dest "${CMAKE_SOURCE_DIR}" "${k}")
- otr_install_dir("${opentrack-doc-src-pfx}" "${dest}")
- endforeach()
+ otr_setup_refresh_install_dir()
+ get_property(source-dirs GLOBAL PROPERTY opentrack-all-source-dirs)
+ foreach(k ${source-dirs})
+ file(RELATIVE_PATH dest "${CMAKE_SOURCE_DIR}" "${k}")
+ otr_install_dir("${opentrack-doc-src-pfx}" "${dest}")
+ endforeach()
- otr_install_dir("${opentrack-doc-src-pfx}" "${CMAKE_SOURCE_DIR}/cmake")
- otr_install_dir("${opentrack-doc-src-pfx}" "${CMAKE_SOURCE_DIR}/bin")
+ otr_install_dir("${opentrack-doc-src-pfx}" "${CMAKE_SOURCE_DIR}/cmake")
+ otr_install_dir("${opentrack-doc-src-pfx}" "${CMAKE_SOURCE_DIR}/bin")
- otr_install_misc("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/CMakeLists.txt")
- otr_install_misc("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/README.md")
- otr_install_misc("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/.github/CONTRIBUTING.md")
- otr_install_misc("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/WARRANTY.txt")
- otr_install_misc("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/OPENTRACK-LICENSING.txt")
- otr_install_misc("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/AUTHORS.md")
- endif()
+ otr_install_misc("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/CMakeLists.txt")
+ otr_install_misc("${opentrack-doc-pfx}" FILES "${CMAKE_SOURCE_DIR}/README.md")
+ otr_install_misc("${opentrack-doc-pfx}" FILES "${CMAKE_SOURCE_DIR}/.github/CONTRIBUTING.md")
+ otr_install_misc("${opentrack-doc-pfx}" FILES "${CMAKE_SOURCE_DIR}/WARRANTY.txt")
+ otr_install_misc("${opentrack-doc-pfx}" FILES "${CMAKE_SOURCE_DIR}/OPENTRACK-LICENSING.txt")
+ otr_install_misc("${opentrack-doc-pfx}" FILES "${CMAKE_SOURCE_DIR}/AUTHORS.md")
endfunction()
function(cleanup_visual_studio_debug)
- #if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
- otr_escape_string(pfx "${CMAKE_INSTALL_PREFIX}")
- install(CODE "file(REMOVE_RECURSE \"${pfx}/.vs\")")
- #endif()
+ otr_escape_string(pfx "${CMAKE_INSTALL_PREFIX}")
+ install(CODE "file(REMOVE_RECURSE \"${pfx}/.vs\")")
endfunction()
otr_install_dir("${opentrack-doc-pfx}" ${CMAKE_SOURCE_DIR}/3rdparty-notices)
@@ -53,17 +56,16 @@ endif()
otr_install_misc("${opentrack-doc-pfx}" FILES ${CMAKE_SOURCE_DIR}/README.md)
-otr_install_misc("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/CMakeLists.txt")
-otr_install_misc("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/README.md")
-otr_install_misc("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/.github/CONTRIBUTING.md")
-otr_install_misc("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/WARRANTY.txt")
-otr_install_misc("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/OPENTRACK-LICENSING.txt")
-otr_install_misc("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/AUTHORS.md")
+otr_install_misc("${opentrack-doc-pfx}" FILES "${CMAKE_SOURCE_DIR}/README.md")
+otr_install_misc("${opentrack-doc-pfx}" FILES "${CMAKE_SOURCE_DIR}/.github/CONTRIBUTING.md")
+otr_install_misc("${opentrack-doc-pfx}" FILES "${CMAKE_SOURCE_DIR}/WARRANTY.txt")
+otr_install_misc("${opentrack-doc-pfx}" FILES "${CMAKE_SOURCE_DIR}/OPENTRACK-LICENSING.txt")
+otr_install_misc("${opentrack-doc-pfx}" FILES "${CMAKE_SOURCE_DIR}/AUTHORS.md")
# this must be done last because the files may be in use already
# do it last so in case of file-in-use failure, the rest is installed
-if(MSVC AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
cleanup_visual_studio_debug()
endif()