Merge pull request #253 from floppym/cmake-gnuinstalldirs
Use new GNUInstallDirs module
This commit is contained in:
commit
600834ce18
@ -34,6 +34,7 @@ include(AutoVersioning)
|
||||
include(ConfigOptions)
|
||||
include(FindOptionalPackage)
|
||||
include(CheckCCompilerFlag)
|
||||
include(GNUInstallDirsWrapper)
|
||||
|
||||
# Soname versioning - 0.0.0 since it is not being managed yet
|
||||
set(FREERDP_VERSION_MAJOR "1")
|
||||
@ -47,16 +48,6 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
endif()
|
||||
|
||||
# Set default libdir
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(CMAKE_INSTALL_LIBDIR "lib")
|
||||
endif()
|
||||
|
||||
# Set default bindir
|
||||
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||
set(CMAKE_INSTALL_BINDIR "bin")
|
||||
endif()
|
||||
|
||||
# build shared libs
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
|
13
cmake/GNUInstallDirsWrapper.cmake
Normal file
13
cmake/GNUInstallDirsWrapper.cmake
Normal file
@ -0,0 +1,13 @@
|
||||
# GNUInstallDirs is a relatively new cmake module, so wrap it to avoid errors
|
||||
include(GNUInstallDirs OPTIONAL RESULT_VARIABLE GID_PATH)
|
||||
if(GID_PATH STREQUAL "NOTFOUND")
|
||||
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||
set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(CMAKE_INSTALL_LIBDIR "lib${LIB_SUFFIX}" CACHE PATH "object code libraries (lib)")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(CMAKE_INSTALL_BINDIR CMAKE_INSTALL_LIBDIR)
|
||||
endif()
|
Loading…
Reference in New Issue
Block a user