mirror of
https://github.com/vgough/encfs.git
synced 2024-11-24 00:43:41 +01:00
add LIB_INSTALL_DIR override, fixes #213
This commit is contained in:
parent
d83c40d6db
commit
3fa633fffe
@ -19,6 +19,10 @@ option (USE_INTERNAL_TINYXML "use built-in TinyXML2" ON)
|
|||||||
option (ENABLE_NLS "compile with Native Language Support (using gettext)" ON)
|
option (ENABLE_NLS "compile with Native Language Support (using gettext)" ON)
|
||||||
option (INSTALL_LIBENCFS "install libencfs" OFF)
|
option (INSTALL_LIBENCFS "install libencfs" OFF)
|
||||||
|
|
||||||
|
if (NOT DEFINED LIB_INSTALL_DIR)
|
||||||
|
set (LIB_INSTALL_DIR lib)
|
||||||
|
endif ()
|
||||||
|
|
||||||
# We need C++ 11
|
# We need C++ 11
|
||||||
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.0)
|
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.0)
|
||||||
# CMake 3.1 has built-in CXX standard checks.
|
# CMake 3.1 has built-in CXX standard checks.
|
||||||
@ -43,11 +47,11 @@ if (APPLE)
|
|||||||
set(CMAKE_MACOSX_RPATH ON)
|
set(CMAKE_MACOSX_RPATH ON)
|
||||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
|
||||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
|
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}" isSystemDir)
|
||||||
if("${isSystemDir}" STREQUAL "-1")
|
if("${isSystemDir}" STREQUAL "-1")
|
||||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -176,7 +180,7 @@ target_link_libraries(encfs
|
|||||||
${Intl_LIBRARIES}
|
${Intl_LIBRARIES}
|
||||||
)
|
)
|
||||||
if (INSTALL_LIBENCFS)
|
if (INSTALL_LIBENCFS)
|
||||||
install (TARGETS encfs DESTINATION lib)
|
install (TARGETS encfs DESTINATION ${LIB_INSTALL_DIR})
|
||||||
endif (INSTALL_LIBENCFS)
|
endif (INSTALL_LIBENCFS)
|
||||||
|
|
||||||
if (IWYU)
|
if (IWYU)
|
||||||
@ -191,7 +195,7 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
# Set RPATH to library install path.
|
# Set RPATH to library install path.
|
||||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
|
||||||
|
|
||||||
add_executable (encfs-bin encfs/main.cpp)
|
add_executable (encfs-bin encfs/main.cpp)
|
||||||
target_link_libraries (encfs-bin encfs)
|
target_link_libraries (encfs-bin encfs)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake ..
|
cmake .. $@
|
||||||
make -j4
|
make -j4
|
||||||
sudo checkinstall --install=no \
|
sudo checkinstall --install=no \
|
||||||
--pkgname="encfs" \
|
--pkgname="encfs" \
|
||||||
|
Loading…
Reference in New Issue
Block a user