summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-install.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2020-03-07 07:50:30 +0100
committerStanislaw Halik <sthalik@misaki.pl>2020-03-07 07:50:30 +0100
commitadb5f89b018da33ee7e3aa8a48e5b742129da161 (patch)
tree7c4ac3954cfe33aa1428f6bb9a16fc18da3348e3 /cmake/opentrack-install.cmake
parenteb2752871e7bfbddab36d7641da6660798072f12 (diff)
cmake: make install prefix path variables more clear
Pointed out by: @rvt
Diffstat (limited to 'cmake/opentrack-install.cmake')
-rw-r--r--cmake/opentrack-install.cmake46
1 files changed, 23 insertions, 23 deletions
diff --git a/cmake/opentrack-install.cmake b/cmake/opentrack-install.cmake
index d464936c..94f3e29d 100644
--- a/cmake/opentrack-install.cmake
+++ b/cmake/opentrack-install.cmake
@@ -17,8 +17,8 @@ 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}/")
+ if((NOT CMAKE_INSTALL_PREFIX STREQUAL "") AND (NOT opentrack-src STREQUAL ""))
+ otr_escape_string(dir "${CMAKE_INSTALL_PREFIX}/${opentrack-src}/")
install(CODE "file(REMOVE_RECURSE \"${dir}\")")
endif()
endfunction()
@@ -28,18 +28,18 @@ function(otr_install_sources)
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}")
+ otr_install_dir("${opentrack-src}" "${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-src}" "${CMAKE_SOURCE_DIR}/cmake")
+ otr_install_dir("${opentrack-src}" "${CMAKE_SOURCE_DIR}/bin")
- 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")
+ otr_install_misc("${opentrack-src}" FILES "${CMAKE_SOURCE_DIR}/CMakeLists.txt")
+ otr_install_misc("${opentrack-doc}" FILES "${CMAKE_SOURCE_DIR}/README.md")
+ otr_install_misc("${opentrack-doc}" FILES "${CMAKE_SOURCE_DIR}/.github/CONTRIBUTING.md")
+ otr_install_misc("${opentrack-doc}" FILES "${CMAKE_SOURCE_DIR}/WARRANTY.txt")
+ otr_install_misc("${opentrack-doc}" FILES "${CMAKE_SOURCE_DIR}/OPENTRACK-LICENSING.txt")
+ otr_install_misc("${opentrack-doc}" FILES "${CMAKE_SOURCE_DIR}/AUTHORS.md")
endfunction()
function(cleanup_visual_studio_debug)
@@ -47,22 +47,22 @@ function(cleanup_visual_studio_debug)
install(CODE "file(REMOVE_RECURSE \"${pfx}/.vs\")")
endfunction()
-otr_install_dir("${opentrack-doc-pfx}" ${CMAKE_SOURCE_DIR}/3rdparty-notices)
-otr_install_dir("${opentrack-doc-pfx}" "${CMAKE_SOURCE_DIR}/settings" "${CMAKE_SOURCE_DIR}/contrib")
+otr_install_dir("${opentrack-doc}" ${CMAKE_SOURCE_DIR}/3rdparty-notices)
+otr_install_dir("${opentrack-doc}" "${CMAKE_SOURCE_DIR}/settings" "${CMAKE_SOURCE_DIR}/contrib")
if(WIN32)
otr_install_misc(. FILES "${CMAKE_SOURCE_DIR}/bin/qt.conf")
otr_install_misc(. FILES "${CMAKE_SOURCE_DIR}/bin/cleye.config")
- otr_install_misc(${opentrack-hier-pfx} FILES "${CMAKE_SOURCE_DIR}/bin/cleye.config")
+ otr_install_misc(${opentrack-libexec} FILES "${CMAKE_SOURCE_DIR}/bin/cleye.config")
endif()
-otr_install_misc("${opentrack-doc-pfx}" FILES ${CMAKE_SOURCE_DIR}/README.md)
+otr_install_misc("${opentrack-doc}" FILES ${CMAKE_SOURCE_DIR}/README.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")
+otr_install_misc("${opentrack-doc}" FILES "${CMAKE_SOURCE_DIR}/README.md")
+otr_install_misc("${opentrack-doc}" FILES "${CMAKE_SOURCE_DIR}/.github/CONTRIBUTING.md")
+otr_install_misc("${opentrack-doc}" FILES "${CMAKE_SOURCE_DIR}/WARRANTY.txt")
+otr_install_misc("${opentrack-doc}" FILES "${CMAKE_SOURCE_DIR}/OPENTRACK-LICENSING.txt")
+otr_install_misc("${opentrack-doc}" 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
@@ -75,9 +75,9 @@ endif()
if (APPLE)
set(OSX_POST_INSTALL_DIR "/../thirdparty")
endif()
-otr_install_exec("${opentrack-hier-pfx}${OSX_POST_INSTALL_DIR}" FILES "${CMAKE_SOURCE_DIR}/bin/freetrackclient.dll")
-otr_install_exec("${opentrack-hier-pfx}${OSX_POST_INSTALL_DIR}" FILES "${CMAKE_SOURCE_DIR}/bin/freetrackclient64.dll")
-otr_install_exec("${opentrack-hier-pfx}${OSX_POST_INSTALL_DIR}" FILES
+otr_install_exec("${opentrack-libexec}${OSX_POST_INSTALL_DIR}" FILES "${CMAKE_SOURCE_DIR}/bin/freetrackclient.dll")
+otr_install_exec("${opentrack-libexec}${OSX_POST_INSTALL_DIR}" FILES "${CMAKE_SOURCE_DIR}/bin/freetrackclient64.dll")
+otr_install_exec("${opentrack-libexec}${OSX_POST_INSTALL_DIR}" FILES
"${CMAKE_SOURCE_DIR}/bin/NPClient.dll"
"${CMAKE_SOURCE_DIR}/bin/NPClient64.dll"
"${CMAKE_SOURCE_DIR}/bin/TrackIR.exe")