forked from hasufell/hasufell-repository
511 lines
24 KiB
Diff
511 lines
24 KiB
Diff
From 864a0ea28f64421c66d711eb4eee2865a0a0efc2 Mon Sep 17 00:00:00 2001
|
|
From: Julian Ospald <hasufell@gentoo.org>
|
|
Date: Tue, 1 Mar 2016 14:49:41 +0100
|
|
Subject: [PATCH] CMAKE: use GNUInstallDirs
|
|
Upstream: not yet, https://github.com/mhogomchungu/zuluCrypt/pull/29
|
|
|
|
This fixes various problems of misplaced files in
|
|
distributions that have a non-standard filesystem
|
|
layout.
|
|
---
|
|
CMakeLists.txt | 32 ++++++---------
|
|
plugins/gpg/CMakeLists.txt | 2 +-
|
|
plugins/hmac/CMakeLists.txt | 2 +-
|
|
plugins/keydialog-qt/CMakeLists.txt | 4 +-
|
|
plugins/keykeyfile/CMakeLists.txt | 4 +-
|
|
plugins/kwallet/CMakeLists.txt | 2 +-
|
|
plugins/luks/CMakeLists.txt | 4 +-
|
|
plugins/network_key/CMakeLists.txt | 4 +-
|
|
plugins/steghide/CMakeLists.txt | 4 +-
|
|
plugins/tomb/CMakeLists.txt | 4 +-
|
|
zuluCrypt-cli/CMakeLists.txt | 49 +++++++++++------------
|
|
zuluCrypt-gui/CMakeLists.txt | 12 +++---
|
|
zuluCrypt-gui/lxqt_wallet/frontend/CMakeLists.txt | 24 ++++-------
|
|
zuluMount-gui/CMakeLists.txt | 14 +++----
|
|
zuluSafe/CMakeLists.txt | 2 +-
|
|
15 files changed, 72 insertions(+), 91 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 20efd00..1081d9a 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -5,6 +5,8 @@ set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS ON)
|
|
|
|
project(zuluCrypt)
|
|
|
|
+INCLUDE(GNUInstallDirs)
|
|
+
|
|
set( PGR_VERSION "4.9.0" )
|
|
set( LIB_VERSION "1.2.0" )
|
|
set( LIB_PLUGIN_VERSION "1.0.0" )
|
|
@@ -102,16 +104,6 @@ else()
|
|
MESSAGE( STATUS "found gcrypt library: ${GCRYPT_LIBRARY}" )
|
|
endif()
|
|
|
|
-if( LIB_SUFFIX )
|
|
- set ( LIB_PATH "${CMAKE_INSTALL_PREFIX}/${LIB_SUFFIX}" )
|
|
-else( LIB_SUFFIX )
|
|
- if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
|
- set ( LIB_PATH "${CMAKE_INSTALL_PREFIX}/lib64" )
|
|
- else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
|
- set ( LIB_PATH "${CMAKE_INSTALL_PREFIX}/lib" )
|
|
- endif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
|
-endif( LIB_SUFFIX )
|
|
-
|
|
file( WRITE ${PROJECT_BINARY_DIR}/install_prefix.h "\n#define INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}/\"\n" )
|
|
|
|
if( REUSEMOUNTPOINT )
|
|
@@ -121,7 +113,7 @@ else()
|
|
endif()
|
|
|
|
|
|
-set( PLUGINPATH "${LIB_PATH}/zuluCrypt" )
|
|
+set( PLUGINPATH "${CMAKE_INSTALL_FULL_LIBDIR}/zuluCrypt" )
|
|
|
|
file( WRITE ${PROJECT_BINARY_DIR}/plugin_path.h "\n#define ZULUCRYPTpluginPath \"${PLUGINPATH}/\"\n" )
|
|
file( APPEND ${PROJECT_BINARY_DIR}/plugin_path.h "\n#define ZULUCRYPTTestPlugin \"${PLUGINPATH}/zuluCrypt-testKey\"\n" )
|
|
@@ -213,7 +205,7 @@ else( NOT NOGUI )
|
|
endif()
|
|
endif( NOT NOGUI )
|
|
|
|
-file( WRITE ${PROJECT_BINARY_DIR}/locale_path.h "\n#define TRANSLATION_PATH \"${CMAKE_INSTALL_PREFIX}/share/zuluCrypt/translations/\"\n")
|
|
+file( WRITE ${PROJECT_BINARY_DIR}/locale_path.h "\n#define TRANSLATION_PATH \"${CMAKE_INSTALL_FULL_DATADIR}/zuluCrypt/translations/\"\n")
|
|
|
|
message ( STATUS "---------------------------------------------------------------------------" )
|
|
message ( STATUS "optional functionality that will be build" )
|
|
@@ -289,15 +281,15 @@ else( UDEVSUPPORT )
|
|
|
|
endif( UDEVSUPPORT )
|
|
|
|
-install ( FILES zuluCrypt-cli.1 DESTINATION share/man/man1 )
|
|
-install ( FILES zuluCrypt-gui.1 DESTINATION share/man/man1 )
|
|
-install ( FILES zuluMount-cli.1 DESTINATION share/man/man1 )
|
|
-install ( FILES zuluMount-gui.1 DESTINATION share/man/man1 )
|
|
-install ( FILES zuluSafe-cli.1 DESTINATION share/man/man1 )
|
|
-install ( FILES docs/zuluCrypt.pdf DESTINATION share/zuluCrypt )
|
|
+install ( FILES zuluCrypt-cli.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )
|
|
+install ( FILES zuluCrypt-gui.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )
|
|
+install ( FILES zuluMount-cli.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )
|
|
+install ( FILES zuluMount-gui.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )
|
|
+install ( FILES zuluSafe-cli.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )
|
|
+install ( FILES docs/zuluCrypt.pdf DESTINATION ${CMAKE_INSTALL_DOCDIR} )
|
|
|
|
-file( WRITE ${PROJECT_BINARY_DIR}/pdf_path.h "\n#define PDF_PATH \"${CMAKE_INSTALL_PREFIX}/share/zuluCrypt/zuluCrypt.pdf\"\n" )
|
|
+file( WRITE ${PROJECT_BINARY_DIR}/pdf_path.h "\n#define PDF_PATH \"${CMAKE_INSTALL_DOCDIR}/zuluCrypt.pdf\"\n" )
|
|
|
|
#install ( FILES translations/zuluMount/de_DE.qm DESTINATION share/zuluCrypt/translations/zuluMount-gui )
|
|
-install ( FILES translations/zuluCrypt/de_DE.qm DESTINATION share/zuluCrypt/translations/zuluCrypt-gui )
|
|
+install ( FILES translations/zuluCrypt/de_DE.qm DESTINATION ${CMAKE_INSTALL_DATADIR}/zuluCrypt/translations/zuluCrypt-gui )
|
|
|
|
diff --git a/plugins/gpg/CMakeLists.txt b/plugins/gpg/CMakeLists.txt
|
|
index 8785f7d..bf62c28 100644
|
|
--- a/plugins/gpg/CMakeLists.txt
|
|
+++ b/plugins/gpg/CMakeLists.txt
|
|
@@ -10,7 +10,7 @@ else()
|
|
add_executable( gpg ${ICON} main.cpp )
|
|
endif()
|
|
|
|
-set_target_properties( gpg PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+set_target_properties( gpg PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
set_target_properties( gpg PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " )
|
|
|
|
TARGET_LINK_LIBRARIES( gpg plugin )
|
|
diff --git a/plugins/hmac/CMakeLists.txt b/plugins/hmac/CMakeLists.txt
|
|
index ed99ed1..86bee1c 100644
|
|
--- a/plugins/hmac/CMakeLists.txt
|
|
+++ b/plugins/hmac/CMakeLists.txt
|
|
@@ -10,7 +10,7 @@ else()
|
|
add_executable( hmac ${ICON} main.cpp )
|
|
endif()
|
|
|
|
-set_target_properties( hmac PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+set_target_properties( hmac PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
set_target_properties( hmac PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " )
|
|
|
|
TARGET_LINK_LIBRARIES( hmac plugin -lgcrypt )
|
|
diff --git a/plugins/keydialog-qt/CMakeLists.txt b/plugins/keydialog-qt/CMakeLists.txt
|
|
index 2c6b145..db41c59 100644
|
|
--- a/plugins/keydialog-qt/CMakeLists.txt
|
|
+++ b/plugins/keydialog-qt/CMakeLists.txt
|
|
@@ -9,7 +9,7 @@ if( QT5 )
|
|
|
|
add_executable( keydialog-qt ${ICON} ${MOC} ${UI} main.cpp mainwindow.cpp )
|
|
TARGET_LINK_LIBRARIES( keydialog-qt sharedObject ${Qt5Widgets_LIBRARIES} ${QtCore_LIBRARIES} zuluCryptPluginManager ${blkid} )
|
|
- set_target_properties( keydialog-qt PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+ set_target_properties( keydialog-qt PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
set_target_properties( keydialog-qt PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " )
|
|
else()
|
|
INCLUDE( ${QT_USE_FILE} )
|
|
@@ -19,7 +19,7 @@ else()
|
|
|
|
add_executable( keydialog-qt ${ICON} ${MOC} ${UI} main.cpp mainwindow.cpp )
|
|
TARGET_LINK_LIBRARIES( keydialog-qt sharedObject ${QT_LIBRARIES} zuluCryptPluginManager ${blkid} )
|
|
- set_target_properties( keydialog-qt PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+ set_target_properties( keydialog-qt PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
set_target_properties( keydialog-qt PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " )
|
|
endif()
|
|
|
|
diff --git a/plugins/keykeyfile/CMakeLists.txt b/plugins/keykeyfile/CMakeLists.txt
|
|
index 19754f2..23a5ad3 100644
|
|
--- a/plugins/keykeyfile/CMakeLists.txt
|
|
+++ b/plugins/keykeyfile/CMakeLists.txt
|
|
@@ -10,9 +10,9 @@ else()
|
|
add_executable( keykeyfile ${ICON} main.cpp )
|
|
endif()
|
|
|
|
-set_target_properties( keykeyfile PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+set_target_properties( keykeyfile PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
set_target_properties( keykeyfile PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " )
|
|
|
|
TARGET_LINK_LIBRARIES( keykeyfile plugin )
|
|
|
|
-install( TARGETS keykeyfile RUNTIME DESTINATION "${PLUGINPATH}" )
|
|
\ No newline at end of file
|
|
+install( TARGETS keykeyfile RUNTIME DESTINATION "${PLUGINPATH}" )
|
|
diff --git a/plugins/kwallet/CMakeLists.txt b/plugins/kwallet/CMakeLists.txt
|
|
index 959fe54..98ca29e 100644
|
|
--- a/plugins/kwallet/CMakeLists.txt
|
|
+++ b/plugins/kwallet/CMakeLists.txt
|
|
@@ -32,7 +32,7 @@ else()
|
|
add_executable( kwallet ${MOC} main.cpp wallet.cpp )
|
|
|
|
TARGET_LINK_LIBRARIES( kwallet ${LIBQTCORE_} ${LIBQTGUI_} ${LIBKDECORE_} ${LIBKDEUI_} sharedObject ${LIBKWALLETBACKEND_} zuluCryptPluginManager )
|
|
- set_target_properties( kwallet PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+ set_target_properties( kwallet PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
set_target_properties( kwallet PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " )
|
|
|
|
install( TARGETS kwallet RUNTIME DESTINATION "${PLUGINPATH}" )
|
|
diff --git a/plugins/luks/CMakeLists.txt b/plugins/luks/CMakeLists.txt
|
|
index bf9e1e1..f999184 100644
|
|
--- a/plugins/luks/CMakeLists.txt
|
|
+++ b/plugins/luks/CMakeLists.txt
|
|
@@ -10,7 +10,7 @@ else()
|
|
add_executable( luks ${ICON} main.cpp )
|
|
endif()
|
|
|
|
-set_target_properties( luks PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+set_target_properties( luks PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
set_target_properties( luks PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " )
|
|
|
|
TARGET_LINK_LIBRARIES( luks plugin )
|
|
@@ -27,7 +27,7 @@ else()
|
|
add_executable( generic_header ${ICON} main.cpp )
|
|
endif()
|
|
|
|
-set_target_properties( generic_header PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+set_target_properties( generic_header PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
set_target_properties( generic_header PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " )
|
|
|
|
TARGET_LINK_LIBRARIES( generic_header plugin )
|
|
diff --git a/plugins/network_key/CMakeLists.txt b/plugins/network_key/CMakeLists.txt
|
|
index 29b25ab..e7bd340 100644
|
|
--- a/plugins/network_key/CMakeLists.txt
|
|
+++ b/plugins/network_key/CMakeLists.txt
|
|
@@ -10,7 +10,7 @@ else()
|
|
add_executable( network_key ${ICON} main.cpp )
|
|
endif()
|
|
|
|
-set_target_properties( network_key PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+set_target_properties( network_key PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
set_target_properties( network_key PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " )
|
|
|
|
TARGET_LINK_LIBRARIES( network_key crypt_buffer plugin )
|
|
@@ -18,4 +18,4 @@ TARGET_LINK_LIBRARIES( network_key crypt_buffer plugin )
|
|
|
|
#currently not used
|
|
|
|
-install( TARGETS network_key RUNTIME DESTINATION "${PLUGINPATH}" )
|
|
\ No newline at end of file
|
|
+install( TARGETS network_key RUNTIME DESTINATION "${PLUGINPATH}" )
|
|
diff --git a/plugins/steghide/CMakeLists.txt b/plugins/steghide/CMakeLists.txt
|
|
index 7d36915..cbaaf77 100644
|
|
--- a/plugins/steghide/CMakeLists.txt
|
|
+++ b/plugins/steghide/CMakeLists.txt
|
|
@@ -10,9 +10,9 @@ else()
|
|
add_executable( steghide ${ICON} main.cpp )
|
|
endif()
|
|
|
|
-set_target_properties( steghide PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+set_target_properties( steghide PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
set_target_properties( steghide PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " )
|
|
|
|
TARGET_LINK_LIBRARIES( steghide plugin )
|
|
|
|
-install( TARGETS steghide RUNTIME DESTINATION "${PLUGINPATH}" )
|
|
\ No newline at end of file
|
|
+install( TARGETS steghide RUNTIME DESTINATION "${PLUGINPATH}" )
|
|
diff --git a/plugins/tomb/CMakeLists.txt b/plugins/tomb/CMakeLists.txt
|
|
index b51fb5f..99113b3 100644
|
|
--- a/plugins/tomb/CMakeLists.txt
|
|
+++ b/plugins/tomb/CMakeLists.txt
|
|
@@ -10,9 +10,9 @@ else()
|
|
add_executable( tomb ${ICON} main.cpp )
|
|
endif()
|
|
|
|
-set_target_properties( tomb PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+set_target_properties( tomb PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
set_target_properties( tomb PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " )
|
|
|
|
TARGET_LINK_LIBRARIES( tomb plugin )
|
|
|
|
-install( TARGETS tomb RUNTIME DESTINATION "${PLUGINPATH}" )
|
|
\ No newline at end of file
|
|
+install( TARGETS tomb RUNTIME DESTINATION "${PLUGINPATH}" )
|
|
diff --git a/zuluCrypt-cli/CMakeLists.txt b/zuluCrypt-cli/CMakeLists.txt
|
|
index da4d79d..84d6ac7 100644
|
|
--- a/zuluCrypt-cli/CMakeLists.txt
|
|
+++ b/zuluCrypt-cli/CMakeLists.txt
|
|
@@ -1,8 +1,8 @@
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
- file(WRITE ${PROJECT_BINARY_DIR}/bin_path.h "\n#define ZULUCRYPTzuluCrypt \"${CMAKE_INSTALL_PREFIX}/bin/zuluCrypt-cli\"\n")
|
|
- file(APPEND ${PROJECT_BINARY_DIR}/bin_path.h "\n#define zuluMountPath \"${CMAKE_INSTALL_PREFIX}/bin/zuluMount-cli\"\n")
|
|
- file(APPEND ${PROJECT_BINARY_DIR}/bin_path.h "\n#define ZULUCRYPTplugInPath \"${CMAKE_INSTALL_PREFIX}/zuluCrypt/zuluCrypt-testKey\"\n")
|
|
+ file(WRITE ${PROJECT_BINARY_DIR}/bin_path.h "\n#define ZULUCRYPTzuluCrypt \"${CMAKE_INSTALL_FULL_BINDIR}/zuluCrypt-cli\"\n")
|
|
+ file(APPEND ${PROJECT_BINARY_DIR}/bin_path.h "\n#define zuluMountPath \"${CMAKE_INSTALL_FULL_BINDIR}/zuluMount-cli\"\n")
|
|
+ file(APPEND ${PROJECT_BINARY_DIR}/bin_path.h "\n#define ZULUCRYPTplugInPath \"${PLUGINPATH}/zuluCrypt-testKey\"\n")
|
|
|
|
add_definitions( -I${PROJECT_BINARY_DIR} )
|
|
|
|
@@ -149,8 +149,8 @@
|
|
|
|
TARGET_LINK_LIBRARIES( zuluCrypt-cli zuluCrypt-exe zuluCrypt )
|
|
|
|
- set_target_properties( zuluCrypt-cli PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
- set_target_properties( zuluMount-cli PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+ set_target_properties( zuluCrypt-cli PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
+ set_target_properties( zuluMount-cli PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
|
|
|
|
#zuluCryptKeyServer not used
|
|
@@ -168,16 +168,16 @@
|
|
set_target_properties( keyring PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic" )
|
|
set_target_properties( keyring PROPERTIES LINK_FLAGS "-pie" )
|
|
TARGET_LINK_LIBRARIES( keyring zuluCryptPluginManager ${keyring_library} ${blkid} ${LIBSECRET_LIBRARIES} )
|
|
- set_target_properties( keyring PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+ set_target_properties( keyring PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
install( TARGETS keyring RUNTIME DESTINATION "${PLUGINPATH}" )
|
|
endif()
|
|
endif()
|
|
|
|
- install(TARGETS zuluCrypt-cli RUNTIME DESTINATION bin
|
|
+ install(TARGETS zuluCrypt-cli RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE SETUID
|
|
)
|
|
|
|
- install(TARGETS zuluMount-cli RUNTIME DESTINATION bin
|
|
+ install(TARGETS zuluMount-cli RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE SETUID
|
|
)
|
|
|
|
@@ -187,20 +187,20 @@
|
|
set_target_properties( zuluCrypt-testKey PROPERTIES LINK_FLAGS "-pie" )
|
|
|
|
TARGET_LINK_LIBRARIES( zuluCrypt-testKey zuluCryptPluginManager ${blkid} )
|
|
- set_target_properties( zuluCrypt-testKey PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
- #set_target_properties( zuluCrypt-test PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+ set_target_properties( zuluCrypt-testKey PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
+ #set_target_properties( zuluCrypt-test PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
|
|
file( WRITE ${PROJECT_BINARY_DIR}/libzuluCrypt.pc
|
|
"prefix=${CMAKE_INSTALL_PREFIX}
|
|
exec_prefix=${CMAKE_INSTALL_PREFIX}
|
|
-libdir=${LIB_PATH}
|
|
-includedir=${CMAKE_INSTALL_PREFIX}/include
|
|
+libdir=${CMAKE_INSTALL_FULL_LIBDIR}
|
|
+includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}
|
|
|
|
Name: libzuluCrypt
|
|
Description: a zuluCrypt library,a front end to cryptsetup
|
|
Version: ${LIB_VERSION}
|
|
-Libs: -L${LIB_PATH} -lcryptsetup -lzuluCrypt -lzuluCrypt-exe -lzuluCryptPluginManager -lblkid -lmount ${TCPLAY_LIB} -L${TCPLAY_LIBDIR} -L${BLKID_LIBDIR} -L${CRYPTSETUP_LIBDIR}
|
|
-Cflags: -I${CMAKE_INSTALL_PREFIX}/include
|
|
+Libs: -L${CMAKE_INSTALL_FULL_LIBDIR} -lcryptsetup -lzuluCrypt -lzuluCrypt-exe -lzuluCryptPluginManager -lblkid -lmount ${TCPLAY_LIB} -L${TCPLAY_LIBDIR} -L${BLKID_LIBDIR} -L${CRYPTSETUP_LIBDIR}
|
|
+Cflags: -I${CMAKE_INSTALL_FULL_INCLUDEDIR}
|
|
\n")
|
|
|
|
#install(TARGETS zuluCrypt-test RUNTIME DESTINATION bin
|
|
@@ -209,22 +209,21 @@ Cflags: -I${CMAKE_INSTALL_PREFIX}/include
|
|
|
|
install( TARGETS zuluCrypt-testKey RUNTIME DESTINATION "${PLUGINPATH}" )
|
|
|
|
- # ${LIB_PATH} is set in ../CMakeLists.txt
|
|
- install(TARGETS zuluCryptPluginManager LIBRARY DESTINATION ${LIB_PATH} )
|
|
+ install(TARGETS zuluCryptPluginManager LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
|
|
|
|
- #install(TARGETS zuluCryptPluginManager-static ARCHIVE DESTINATION ${LIB_PATH} )
|
|
+ #install(TARGETS zuluCryptPluginManager-static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} )
|
|
|
|
- install(TARGETS zuluCrypt LIBRARY DESTINATION ${LIB_PATH} )
|
|
+ install(TARGETS zuluCrypt LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
|
|
|
|
- install(TARGETS zuluCrypt-exe LIBRARY DESTINATION ${LIB_PATH} )
|
|
+ install(TARGETS zuluCrypt-exe LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
|
|
|
|
- #install(TARGETS zuluCrypt-exe-static ARCHIVE DESTINATION ${LIB_PATH} )
|
|
+ #install(TARGETS zuluCrypt-exe-static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} )
|
|
|
|
- #install(TARGETS zuluCrypt-static ARCHIVE DESTINATION ${LIB_PATH} )
|
|
+ #install(TARGETS zuluCrypt-static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} )
|
|
|
|
- install(FILES lib/libzuluCrypt.h DESTINATION include/zuluCrypt )
|
|
- install(FILES bin/libzuluCrypt-exe.h DESTINATION include/zuluCrypt )
|
|
- install(FILES pluginManager/libzuluCryptPluginManager.h DESTINATION include/zuluCrypt )
|
|
- install(FILES ${PROJECT_BINARY_DIR}/libzuluCrypt.pc DESTINATION ${LIB_PATH}/pkgconfig/ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ )
|
|
+ install(FILES lib/libzuluCrypt.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/zuluCrypt )
|
|
+ install(FILES bin/libzuluCrypt-exe.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/zuluCrypt )
|
|
+ install(FILES pluginManager/libzuluCryptPluginManager.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/zuluCrypt )
|
|
+ install(FILES ${PROJECT_BINARY_DIR}/libzuluCrypt.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ )
|
|
|
|
|
|
diff --git a/zuluCrypt-gui/CMakeLists.txt b/zuluCrypt-gui/CMakeLists.txt
|
|
index 8a78adf..db4c5de 100644
|
|
--- a/zuluCrypt-gui/CMakeLists.txt
|
|
+++ b/zuluCrypt-gui/CMakeLists.txt
|
|
@@ -94,7 +94,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} )
|
|
|
|
add_executable( zuluCrypt-gui ${MOC} ${UI} ${SRC} ${TRAY_RC_SRCS} )
|
|
|
|
-set_target_properties( zuluCrypt-gui PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+set_target_properties( zuluCrypt-gui PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
|
|
set_target_properties( zuluCrypt-gui PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wextra -Wall -s -fPIC -pedantic" )
|
|
|
|
@@ -117,16 +117,16 @@ else()
|
|
|
|
endif()
|
|
|
|
-install( TARGETS zuluCrypt-gui RUNTIME DESTINATION bin )
|
|
+install( TARGETS zuluCrypt-gui RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
|
|
|
|
install( FILES ${PROJECT_BINARY_DIR}/zuluCrypt.desktop
|
|
-DESTINATION share/applications
|
|
+DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications
|
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
|
)
|
|
|
|
-install( FILES zuluCrypt.png DESTINATION /usr/share/icons/hicolor/48x48/apps/ )
|
|
-install( FILES zuluCrypt.png DESTINATION /usr/share/pixmaps )
|
|
+install( FILES zuluCrypt.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps/ )
|
|
+install( FILES zuluCrypt.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps )
|
|
#install (FILES zuluCrypt.png DESTINATION share/icons/hicolor/32x32/apps)
|
|
|
|
# desktop file section
|
|
@@ -135,7 +135,7 @@ file( WRITE ${PROJECT_BINARY_DIR}/zuluCrypt.desktop
|
|
"[Desktop Entry]
|
|
Comment[en_US]=
|
|
Comment=
|
|
-Exec=${CMAKE_INSTALL_PREFIX}/bin/zuluCrypt-gui -d %U
|
|
+Exec=${CMAKE_INSTALL_FULL_BINDIR}/zuluCrypt-gui -d %U
|
|
GenericName[en_US]=Encrypted volumes manager
|
|
GenericName=Encrypted volumes manager
|
|
Icon=zuluCrypt.png
|
|
diff --git a/zuluCrypt-gui/lxqt_wallet/frontend/CMakeLists.txt b/zuluCrypt-gui/lxqt_wallet/frontend/CMakeLists.txt
|
|
index 2657a5f..39e8504 100644
|
|
--- a/zuluCrypt-gui/lxqt_wallet/frontend/CMakeLists.txt
|
|
+++ b/zuluCrypt-gui/lxqt_wallet/frontend/CMakeLists.txt
|
|
@@ -281,33 +281,23 @@ set_target_properties(lxqtwallet PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=6
|
|
set_target_properties(lxqtwallet PROPERTIES SOVERSION "${LIBRARY_VERSION}")
|
|
TARGET_LINK_LIBRARIES(lxqtwallet "${link_libraries}" lxqtwallet-backend)
|
|
|
|
-if(LIB_SUFFIX)
|
|
- set(LIB_PATH "${CMAKE_INSTALL_PREFIX}/${LIB_SUFFIX}")
|
|
-else()
|
|
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
- set(LIB_PATH "${CMAKE_INSTALL_PREFIX}/lib64")
|
|
- else()
|
|
- set(LIB_PATH "${CMAKE_INSTALL_PREFIX}/lib")
|
|
- endif()
|
|
-endif()
|
|
-
|
|
if(BUILD_SHARED)
|
|
- install(TARGETS lxqtwallet RUNTIME LIBRARY DESTINATION "${LIB_PATH}")
|
|
+ install(TARGETS lxqtwallet RUNTIME LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
|
|
|
- install(FILES lxqt_wallet.h DESTINATION "${CMAKE_INSTALL_PREFIX}/include/lxqt")
|
|
+ install(FILES lxqt_wallet.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/lxqt")
|
|
|
|
file( WRITE ${PROJECT_BINARY_DIR}/lxqtwallet.pc
|
|
"prefix=${CMAKE_INSTALL_PREFIX}
|
|
exec_prefix=${CMAKE_INSTALL_PREFIX}
|
|
-libdir=${LIB_PATH}
|
|
-includedir=${CMAKE_INSTALL_PREFIX}/include/lxqt
|
|
+libdir=${CMAKE_INSTALL_FULL_LIBDIR}
|
|
+includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}/lxqt
|
|
|
|
Name: lxqt_wallet
|
|
Description: lxqt secure storage system
|
|
Version: ${LIBRARY_VERSION}
|
|
-Libs: -L${LIB_PATH} -lQtGui -lQtCore -lgcrypt
|
|
-Cflags: -I${CMAKE_INSTALL_PREFIX}/include/lxqt
|
|
+Libs: -L${CMAKE_INSTALL_FULL_LIBDIR} -lQtGui -lQtCore -lgcrypt
|
|
+Cflags: -I${CMAKE_INSTALL_FULL_INCLUDEDIR}/lxqt
|
|
\n")
|
|
|
|
- install(FILES ${PROJECT_BINARY_DIR}/lxqtwallet.pc DESTINATION ${LIB_PATH}/pkgconfig/ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ )
|
|
+ install(FILES ${PROJECT_BINARY_DIR}/lxqtwallet.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ )
|
|
endif()
|
|
diff --git a/zuluMount-gui/CMakeLists.txt b/zuluMount-gui/CMakeLists.txt
|
|
index 1ff1af1..52daf56 100644
|
|
--- a/zuluMount-gui/CMakeLists.txt
|
|
+++ b/zuluMount-gui/CMakeLists.txt
|
|
@@ -64,7 +64,7 @@ if( QT5 )
|
|
|
|
TARGET_LINK_LIBRARIES( zuluMount-gui sharedObject lxqtwallet ${Qt5Widgets_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${blkid} zuluCryptPluginManager )
|
|
|
|
- set_target_properties( zuluMount-gui PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+ set_target_properties( zuluMount-gui PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
else()
|
|
find_package( Qt4 REQUIRED )
|
|
|
|
@@ -85,21 +85,21 @@ else()
|
|
|
|
TARGET_LINK_LIBRARIES( zuluMount-gui sharedObject lxqtwallet ${QT_LIBRARIES} ${blkid} zuluCryptPluginManager )
|
|
|
|
- set_target_properties( zuluMount-gui PROPERTIES INSTALL_RPATH "${LIB_PATH}" )
|
|
+ set_target_properties( zuluMount-gui PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" )
|
|
endif()
|
|
|
|
set_target_properties( zuluMount-gui PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wextra -Wall -s -fPIC -pedantic " )
|
|
|
|
-install( TARGETS zuluMount-gui RUNTIME DESTINATION bin )
|
|
+install( TARGETS zuluMount-gui RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
|
|
|
|
install ( FILES ${PROJECT_BINARY_DIR}/zuluMount.desktop
|
|
-DESTINATION share/applications
|
|
+DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications
|
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
|
)
|
|
|
|
-install( FILES zuluMount.png DESTINATION /usr/share/icons/hicolor/48x48/apps/ )
|
|
-install( FILES zuluMount.png DESTINATION /usr/share/pixmaps )
|
|
+install( FILES zuluMount.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps/ )
|
|
+install( FILES zuluMount.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps )
|
|
|
|
#install ( FILES zuluMount.png DESTINATION share/icons/hicolor/32x32/apps )
|
|
|
|
@@ -109,7 +109,7 @@ file( WRITE ${PROJECT_BINARY_DIR}/zuluMount.desktop
|
|
"[Desktop Entry]
|
|
Comment[en_US]=
|
|
Comment=
|
|
-Exec=${CMAKE_INSTALL_PREFIX}/bin/zuluMount-gui -d %U
|
|
+Exec=${CMAKE_INSTALL_FULL_BINDIR}/zuluMount-gui -d %U
|
|
GenericName[en_US]=Encrypted volume and Partition mounter
|
|
GenericName=Encrypted volumes and partition mounter
|
|
Icon=zuluMount.png
|
|
diff --git a/zuluSafe/CMakeLists.txt b/zuluSafe/CMakeLists.txt
|
|
index e3ddac8..a4f6146 100644
|
|
--- a/zuluSafe/CMakeLists.txt
|
|
+++ b/zuluSafe/CMakeLists.txt
|
|
@@ -19,4 +19,4 @@
|
|
set_target_properties( zuluSafe-cli PROPERTIES LINK_FLAGS "-pie" )
|
|
TARGET_LINK_LIBRARIES( zuluSafe-cli "${GCRYPT_LIBRARY}" )
|
|
|
|
- install(TARGETS zuluSafe-cli RUNTIME DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )
|
|
+ install(TARGETS zuluSafe-cli RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )
|
|
--
|
|
2.7.2
|
|
|