diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2019-06-25 18:46:25 +0200 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-06-25 18:46:25 +0200 | 
| commit | a7e9d910af516e76c56b582c65a3c47d6ad4cb77 (patch) | |
| tree | 42c386dbcd39a026e393e490b10965bbdcb44c0f | |
| parent | 3c3025cf003b5ced670eb70fcb253307ef7342d6 (diff) | |
cmake: fix modules not installing
| -rw-r--r-- | cmake/opentrack-boilerplate.cmake | 5 | ||||
| -rw-r--r-- | cmake/opentrack-hier.cmake | 7 | 
2 files changed, 8 insertions, 4 deletions
| diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index b0d58aab..d76df9e4 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -216,9 +216,12 @@ function(otr_module n_)      endif()      if(NOT arg_NO-INSTALL) -        if(arg_BIN) +        if(arg_BIN AND WIN32) +            install(TARGETS "${n}" RUNTIME DESTINATION ${opentrack-hier-bin} PERMISSIONS ${opentrack-perms-exec}) +        else()              install(TARGETS "${n}" ${opentrack-hier-str} PERMISSIONS ${opentrack-perms-exec})          endif() +          if(MSVC)              set(opentrack_install-debug-info FALSE CACHE BOOL "Whether to build and install debug info at install time")              if(opentrack_install-debug-info) diff --git a/cmake/opentrack-hier.cmake b/cmake/opentrack-hier.cmake index 950bfefb..1cdfff89 100644 --- a/cmake/opentrack-hier.cmake +++ b/cmake/opentrack-hier.cmake @@ -14,7 +14,7 @@ if(APPLE)      set(opentrack-hier-pfx ".")      set(opentrack-hier-path "/")                        # MUST HAVE A TRAILING BACKSLASH      set(opentrack-hier-doc "/")                         # MUST HAVE A TRAILING BACKSLASH -    set(opentrack-hier-str RUNTIME DESTINATION . LIBRARY DESTINATION .) +    set(opentrack-hier-bin ".")      set(opentrack-doc-pfx "./doc")      set(opentrack-doc-src-pfx "./source-code")      set(opentrack-i18n-pfx "./i18n") @@ -23,9 +23,9 @@ elseif(WIN32)      set(opentrack-hier-pfx "./modules")      set(opentrack-hier-path "/modules/")                # 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-hier-str RUNTIME DESTINATION ./modules/ LIBRARY DESTINATION ./modules/)      set(opentrack-i18n-pfx "./i18n")      set(opentrack-i18n-path "./i18n")      set(opentrack-hier-debug "./debug") @@ -33,13 +33,14 @@ else()      set(opentrack-hier-pfx "libexec/opentrack")      set(opentrack-hier-path "/../libexec/opentrack/")   # 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-install-rpath "${CMAKE_INSTALL_PREFIX}/${opentrack-hier-pfx}") -    set(opentrack-hier-str ARCHIVE DESTINATION share/opentrack LIBRARY DESTINATION ${opentrack-hier-pfx} RUNTIME DESTINATION bin)      set(opentrack-i18n-pfx "./share/opentrack/i18n")      set(opentrack-i18n-path "../share/opentrack/i18n")  endif() +set(opentrack-hier-str ARCHIVE DESTINATION lib/opentrack RUNTIME DESTINATION ${opentrack-hier-pfx} LIBRARY DESTINATION ${opentrack-hier-pfx})  function(otr_escape_string var str)      string(REGEX REPLACE "([^_A-Za-z0-9./:-])" "\\\\\\1" str "${str}") | 
