diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-09-06 08:30:28 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-09-06 08:30:28 +0200 |
commit | 12ff17463610e446fc6569ee1f4479be9107e38e (patch) | |
tree | 5a64a98276d5a329cb789f7e780d9ee06aebddf0 /cmake | |
parent | f17f1a5910987654f64bdf2209ea2a8ad96f7e1e (diff) |
Revert "cmake: cleanup install prefix handling"
Fixes proto/freetrack
Issue: #983
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/opentrack-boilerplate.cmake | 8 | ||||
-rw-r--r-- | cmake/opentrack-hier.cmake | 38 | ||||
-rw-r--r-- | cmake/opentrack-i18n.cmake | 2 |
3 files changed, 24 insertions, 24 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 39d75e5a..ffa4ea02 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -18,10 +18,10 @@ set(new-hier-path "#pragma once #endif #define OPENTRACK_LIBRARY_PREFIX \"\" -#define OPENTRACK_LIBRARY_PATH \"/${opentrack-hier-path}/\" -#define OPENTRACK_DOC_PATH \"${opentrack-hier-doc}/\" +#define OPENTRACK_LIBRARY_PATH \"${opentrack-hier-path}\" +#define OPENTRACK_DOC_PATH \"${opentrack-hier-doc}\" #define OPENTRACK_CONTRIB_PATH \"${opentrack-hier-doc}contrib/\" -#define OPENTRACK_I18N_PATH \"${opentrack-hier-root}/${opentrack-i18n-pfx}\" +#define OPENTRACK_I18N_PATH \"${opentrack-i18n-path}\" ") function(otr_write_library_paths) @@ -282,7 +282,7 @@ function(otr_install_lib target dest) set(pdb-path "") otr_pdb_for_dll(pdb-path "${path}") if(pdb-path) - install(FILES "${pdb-path}" DESTINATION "${opentrack-hier-debug}" PERMISSIONS ${opentrack-perms-file}) + install(FILES "${pdb-path}" DESTINATION "${opentrack-hier-debug}" PERMISSIONS ${opentrack-perms-exec}) endif() endif() install(FILES "${path}" DESTINATION "${dest}" PERMISSIONS ${opentrack-perms-exec}) diff --git a/cmake/opentrack-hier.cmake b/cmake/opentrack-hier.cmake index d0f7c987..7dcdb52d 100644 --- a/cmake/opentrack-hier.cmake +++ b/cmake/opentrack-hier.cmake @@ -11,35 +11,35 @@ include_guard(GLOBAL) set(opentrack-install-rpath "") if(APPLE) - set(opentrack-hier-root ".") set(opentrack-hier-pfx ".") - set(opentrack-hier-path ".") - set(opentrack-hier-doc ".") + set(opentrack-hier-path "/") # MUST HAVE A TRAILING BACKSLASH + set(opentrack-hier-doc "/") # MUST HAVE A TRAILING BACKSLASH set(opentrack-hier-bin ".") - set(opentrack-doc-pfx "doc") - set(opentrack-doc-src-pfx "source-code") - set(opentrack-i18n-pfx "i18n") + set(opentrack-doc-pfx "./doc") + set(opentrack-doc-src-pfx "./source-code") + set(opentrack-i18n-pfx "./i18n") + set(opentrack-i18n-path "./i18n") elseif(WIN32) - set(opentrack-hier-root ".") set(opentrack-hier-pfx "modules") - set(opentrack-hier-path "${opentrack-hier-pfx}") - set(opentrack-hier-doc "doc") + set(opentrack-hier-path "/${opentrack-hier-pfx}/") # MUST HAVE A TRAILING BACKSLASH + set(opentrack-hier-doc "/doc/") # MUST HAVE A TRAILING BACKSLASH set(opentrack-hier-bin ".") - set(opentrack-doc-pfx "doc") - set(opentrack-doc-src-pfx "source-code") - set(opentrack-i18n-pfx "i18n") - set(opentrack-hier-debug "debug") + set(opentrack-doc-pfx "./doc") + set(opentrack-doc-src-pfx "./source-code") + set(opentrack-i18n-pfx "./i18n") + set(opentrack-i18n-path "./i18n") + set(opentrack-hier-debug "./debug") else() - set(opentrack-hier-root "..") set(opentrack-hier-pfx "libexec/opentrack") - set(opentrack-hier-doc "share/doc/opentrack") + set(opentrack-hier-path "/../${opentrack-hier-pfx}/") # MUST HAVE A TRAILING BACKSLASH + set(opentrack-hier-doc "/share/doc/opentrack/") # MUST HAVE A TRAILING BACKSLASH set(opentrack-hier-bin "bin") - set(opentrack-doc-pfx "share/doc/opentrack") - set(opentrack-doc-src-pfx "share/doc/opentrack/source-code") - set(opentrack-i18n-pfx "share/opentrack/i18n") + set(opentrack-doc-pfx "./share/doc/opentrack") + set(opentrack-doc-src-pfx "./share/doc/opentrack/source-code") set(opentrack-install-rpath "${CMAKE_INSTALL_PREFIX}/${opentrack-hier-pfx}") + set(opentrack-i18n-pfx "./share/opentrack/i18n") + set(opentrack-i18n-path "../share/opentrack/i18n") endif() -set(opentrack-hier-path "${opentrack-hier-root}/${opentrack-hier-pfx}") set(opentrack-hier-str RUNTIME DESTINATION ${opentrack-hier-pfx} LIBRARY DESTINATION ${opentrack-hier-pfx}) function(otr_escape_string var str) diff --git a/cmake/opentrack-i18n.cmake b/cmake/opentrack-i18n.cmake index b924a8d8..e89f5c42 100644 --- a/cmake/opentrack-i18n.cmake +++ b/cmake/opentrack-i18n.cmake @@ -92,7 +92,7 @@ function(otr_merge_translations) add_dependencies(i18n-lrelease ${target-name}) install(FILES "${qm-output}" - DESTINATION "${opentrack-i18n-pfx}" + DESTINATION "${CMAKE_INSTALL_PREFIX}/${opentrack-i18n-pfx}" PERMISSIONS ${opentrack-perms-file}) endforeach() endfunction() |