Skip to content

Commit

Permalink
CMakeLists.txt: replace hard coded install paths with use of GNUInsta…
Browse files Browse the repository at this point in the history
…llDirs module, sets minimum required version of cmake to 2.8.5
  • Loading branch information
slaufmann committed Jun 27, 2019
1 parent b63c571 commit 3c00c4c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.8.5)
project(inicpp)

set(SRC_DIR src)
Expand Down Expand Up @@ -73,9 +73,10 @@ endif()


# ========== Install targets - 'sudo make install' ==========
include(GNUInstallDirs)
include(InstallRequiredSystemLibraries)
set(INCLUDE_INSTALL_DIR /usr/local/include CACHE PATH "Directory in which to install system header files.")
set(LIB_INSTALL_DIR /usr/local/lib CACHE PATH "Directory in which to install system libraries.")
set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_FULL_INCLUDEDIR} CACHE PATH "Directory in which to install system header files.")
set(LIB_INSTALL_DIR ${CMAKE_INSTALL_FULL_LIBDIR} CACHE PATH "Directory in which to install system libraries.")
if(UNIX)
install(DIRECTORY ${INCLUDE_DIR} DESTINATION ${INCLUDE_INSTALL_DIR})
install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT library)
Expand Down

0 comments on commit 3c00c4c

Please sign in to comment.