summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-hier.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-03-27 01:35:34 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-03-27 02:23:32 +0200
commit9deb6dafac0877423abe38eab887d11ea80ef548 (patch)
treeb347e85dee32faab599653d283e51efead93e0df /cmake/opentrack-hier.cmake
parent9921018749d91d4d3c3063347dc40b882f8f6634 (diff)
cmake: rename project's function prefix
It's not annoying having to type it anymore. Also "otr_boilerplate" -> "otr_module".
Diffstat (limited to 'cmake/opentrack-hier.cmake')
-rw-r--r--cmake/opentrack-hier.cmake99
1 files changed, 48 insertions, 51 deletions
diff --git a/cmake/opentrack-hier.cmake b/cmake/opentrack-hier.cmake
index a892311c..905625fb 100644
--- a/cmake/opentrack-hier.cmake
+++ b/cmake/opentrack-hier.cmake
@@ -7,59 +7,56 @@
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-if(NOT opentrack-hier-included)
- set(opentrack-hier-included TRUE)
- set(opentrack-install-rpath "")
- if(APPLE)
- set(opentrack-hier-pfx ".")
- set(opentrack-hier-path "/")
- set(opentrack-hier-doc "/")
- set(opentrack-hier-str RUNTIME DESTINATION . LIBRARY DESTINATION .)
- 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-pfx "./modules")
- set(opentrack-hier-path "/modules/")
- set(opentrack-hier-doc "/doc/")
- 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")
- else()
- set(opentrack-hier-pfx "libexec/opentrack")
- set(opentrack-hier-path "/../libexec/opentrack/")
- set(opentrack-hier-doc "/share/doc/opentrack/")
- 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 lib/opentrack LIBRARY DESTINATION ${opentrack-hier-pfx} RUNTIME DESTINATION bin)
- set(opentrack-i18n-pfx "./libexec/opentrack/i18n")
- set(opentrack-i18n-path "../libexec/opentrack/i18n")
- endif()
+set(opentrack-install-rpath "")
+if(APPLE)
+ set(opentrack-hier-pfx ".")
+ set(opentrack-hier-path "/")
+ set(opentrack-hier-doc "/")
+ set(opentrack-hier-str RUNTIME DESTINATION . LIBRARY DESTINATION .)
+ 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-pfx "./modules")
+ set(opentrack-hier-path "/modules/")
+ set(opentrack-hier-doc "/doc/")
+ 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")
+else()
+ set(opentrack-hier-pfx "libexec/opentrack")
+ set(opentrack-hier-path "/../libexec/opentrack/")
+ set(opentrack-hier-doc "/share/doc/opentrack/")
+ 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 lib/opentrack LIBRARY DESTINATION ${opentrack-hier-pfx} RUNTIME DESTINATION bin)
+ set(opentrack-i18n-pfx "./libexec/opentrack/i18n")
+ set(opentrack-i18n-path "../libexec/opentrack/i18n")
+endif()
- function(opentrack_escape_string var str)
- string(REGEX REPLACE "([\$\\\"#])" "\\\\\\1" tmp__ "${str}")
- set(${var} "${tmp__}" PARENT_SCOPE)
- endfunction()
+function(otr_escape_string var str)
+ string(REGEX REPLACE "([\$\\\"#])" "\\\\\\1" tmp__ "${str}")
+ set(${var} "${tmp__}" PARENT_SCOPE)
+endfunction()
- function(opentrack_setup_refresh_install_dir)
- if((NOT CMAKE_INSTALL_PREFIX STREQUAL "") AND (NOT opentrack-doc-src-pfx STREQUAL ""))
- opentrack_escape_string(dir "${CMAKE_INSTALL_PREFIX}/${opentrack-doc-src-pfx}/")
- install(CODE "file(REMOVE_RECURSE \"${dir}\")")
- endif()
- endfunction()
+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()
- opentrack_setup_refresh_install_dir()
+otr_setup_refresh_install_dir()
- set(opentrack-contrib-pfx "${opentrack-doc-pfx}/contrib")
+set(opentrack-contrib-pfx "${opentrack-doc-pfx}/contrib")
- set(opentrack-binary-suffix "")
- if(APPLE)
- set(opentrack-binary-suffix ".bin")
- elseif(WIN32)
- set(opentrack-binary-suffix ".exe")
- endif()
-endif() # include guard
+set(opentrack-binary-suffix "")
+if(APPLE)
+ set(opentrack-binary-suffix ".bin")
+elseif(WIN32)
+ set(opentrack-binary-suffix ".exe")
+endif()