aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Holberton <tay10r@protonmail.com>2019-12-17 09:17:36 -0500
committerGitHub <noreply@github.com>2019-12-17 09:17:36 -0500
commitea9da6e1b16c14408b3bc5323cdc7560366bb943 (patch)
tree56bb98bc61446059fb84b4bfca61af1fa1e1c4ed
parent8449529c7e50f432091539ba7b438e79b04059b5 (diff)
parentfe4f3c2a37a81201f463ff962364f014f50c9896 (diff)
Merge pull request #143 from kraj/master
Use CMAKE_INSTALL_<path> instead of hardcoding bin/lib/ install paths
-rw-r--r--CMakeLists.txt14
1 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb31c58..1cc4a85 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,12 +41,20 @@ add_util("tinymix" "utils/tinymix.c")
install(FILES ${HDRS}
DESTINATION "include/tinyalsa")
+if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
+ set(CMAKE_INSTALL_LIBDIR lib)
+endif()
+
+if(NOT DEFINED CMAKE_INSTALL_BINDIR)
+ set(CMAKE_INSTALL_BINDIR bin)
+endif()
+
install(TARGETS "tinyalsa"
"tinyplay"
"tinycap"
"tinymix"
"tinypcminfo"
- RUNTIME DESTINATION "bin"
- ARCHIVE DESTINATION "lib"
- LIBRARY DESTINATION "lib")
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})