blob: df348dc852e2e7eba07403c494bcc4b16b944ba7 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001Upstream-Status: Submitted [https://github.com/brianhsu/xfce4-hotcorner-plugin/pull/8]
2
3The library install path may be ${CMAKE_INSTALL_PREFIX}/lib64 rather
4than fixed ${CMAKE_INSTALL_PREFIX}/lib. Provide a variable to make it
5could override by cmake command line.
6
7Signed-off-by: Kai Kang <kai.kang@windriver.com>
8---
9 CMakeLists.txt | 7 ++++---
10 1 file changed, 4 insertions(+), 3 deletions(-)
11
12diff --git a/CMakeLists.txt b/CMakeLists.txt
13index e193787..84cb52d 100644
14--- a/CMakeLists.txt
15+++ b/CMakeLists.txt
16@@ -10,8 +10,9 @@ include(GNUInstallDirs)
17
18 PKG_CHECK_MODULES(GTK REQUIRED libxfce4panel-1.0 libxfce4ui-1 libwnck-3.0)
19
20-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
21-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
22+set(BASE_LIB_PATH "lib" CACHE STRING "base library install path")
23+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BASE_LIB_PATH})
24+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BASE_LIB_PATH})
25 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
26
27 INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIRS})
28@@ -28,7 +29,7 @@ ADD_LIBRARY(hotcorner SHARED src/hotcorner.c src/util.c)
29
30 TARGET_LINK_LIBRARIES(hotcorner ${GTK_LIBRARIES})
31
32-INSTALL(TARGETS hotcorner LIBRARY DESTINATION lib/xfce4/panel/plugins/)
33+INSTALL(TARGETS hotcorner LIBRARY DESTINATION ${BASE_LIB_PATH}/xfce4/panel/plugins/)
34 INSTALL(FILES hotcorner.desktop DESTINATION share/xfce4/panel/plugins/)
35 GETTEXT_CREATE_TRANSLATIONS(po/xfce4-hotcorner-plugin.pot ALL po/zh_TW.po)
36
37--
382.11.0
39