|
|
70b998a |
From a0ef151426aaf43068b076ab251f5e56d14bb3a2 Mon Sep 17 00:00:00 2001
|
|
|
70b998a |
From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
|
|
|
70b998a |
Date: Tue, 18 Aug 2020 21:58:56 +0100
|
|
|
70b998a |
Subject: [PATCH 2/2] Use LIB_INSTALL_DIR instead of hardcoding lib
|
|
|
70b998a |
|
|
|
70b998a |
---
|
|
|
70b998a |
CMakeLists.txt | 9 +++++++--
|
|
|
70b998a |
src/lib/CMakeLists.txt | 4 ++--
|
|
|
70b998a |
2 files changed, 9 insertions(+), 4 deletions(-)
|
|
|
70b998a |
|
|
|
70b998a |
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
70b998a |
index 315729f..1cd1f42 100644
|
|
|
70b998a |
--- a/CMakeLists.txt
|
|
|
70b998a |
+++ b/CMakeLists.txt
|
|
|
70b998a |
@@ -60,6 +60,11 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "CYGWIN")
|
|
|
70b998a |
set(CYGWIN 1)
|
|
|
70b998a |
endif()
|
|
|
70b998a |
|
|
|
70b998a |
+# set up libdir
|
|
|
70b998a |
+if(NOT DEFINED LIB_INSTALL_DIR)
|
|
|
70b998a |
+ set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib)
|
|
|
70b998a |
+endif()
|
|
|
70b998a |
+
|
|
|
70b998a |
# =============================================================================
|
|
|
70b998a |
# Include cmake modules
|
|
|
70b998a |
# =============================================================================
|
|
|
70b998a |
@@ -186,8 +191,8 @@ add_subdirectory(src/bin)
|
|
|
70b998a |
# =============================================================================
|
|
|
70b998a |
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/include/ DESTINATION include)
|
|
|
70b998a |
if(NOT IV_AS_SUBPROJECT)
|
|
|
70b998a |
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/iv-config.cmake DESTINATION share/cmake)
|
|
|
70b998a |
- install(EXPORT iv DESTINATION share/cmake)
|
|
|
70b998a |
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/iv-config.cmake DESTINATION ${LIB_INSTALL_DIR}/cmake/iv)
|
|
|
70b998a |
+ install(EXPORT iv DESTINATION ${LIB_INSTALL_DIR}/cmake/iv)
|
|
|
70b998a |
endif()
|
|
|
70b998a |
|
|
|
70b998a |
# =============================================================================
|
|
|
70b998a |
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
|
|
|
70b998a |
index 71f74b7..b783083 100644
|
|
|
70b998a |
--- a/src/lib/CMakeLists.txt
|
|
|
70b998a |
+++ b/src/lib/CMakeLists.txt
|
|
|
70b998a |
@@ -496,12 +496,12 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/app-defaults/ DESTINATION share/ap
|
|
|
70b998a |
if(NOT IV_WINDOWS_BUILD)
|
|
|
70b998a |
install(TARGETS interviews
|
|
|
70b998a |
EXPORT iv
|
|
|
70b998a |
- DESTINATION lib
|
|
|
70b998a |
+ DESTINATION ${LIB_INSTALL_DIR}
|
|
|
70b998a |
INCLUDES
|
|
|
70b998a |
DESTINATION $<INSTALL_INTERFACE:include>)
|
|
|
70b998a |
install(TARGETS unidraw
|
|
|
70b998a |
EXPORT iv
|
|
|
70b998a |
- DESTINATION lib
|
|
|
70b998a |
+ DESTINATION ${LIB_INSTALL_DIR}
|
|
|
70b998a |
INCLUDES
|
|
|
70b998a |
DESTINATION $<INSTALL_INTERFACE:include>)
|
|
|
70b998a |
else()
|
|
|
70b998a |
--
|
|
|
70b998a |
2.26.2
|
|
|
70b998a |
|