aisl/cmake.paths

91 lines
2.5 KiB
Plaintext
Raw Normal View History

2019-02-23 21:06:34 +01:00
# Paths -----------------------------------------------------------------------
# Constants -------------------------------------------------------------------
set(INCLUDE_DIR "include")
set(BUILD_DIR "build")
# CMAKE installation paths ----------------------------------------------------
# -DCMAKE_INSTALL_PREFIX:PATH=/usr
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr")
endif()
# -DINCLUDE_INSTALL_DIR:PATH=/usr/include
if(NOT DEFINED INCLUDE_INSTALL_DIR)
set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include")
endif()
# -DSHARE_INSTALL_PREFIX:PATH=/usr/share
if(NOT DEFINED SHARE_INSTALL_PREFIX)
set(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share")
endif()
# -DSYSCONF_INSTALL_DIR:PATH=/etc
if(NOT DEFINED SYSCONF_INSTALL_DIR)
set(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc")
endif()
# -DCMAKE_INSTALL_LIBDIR:PATH=lib64
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib${SYSTEM_LIB_SUFFIX}")
endif()
# -DLIB_INSTALL_DIR:PATH=/usr/lib64
if(NOT DEFINED LIB_INSTALL_DIR)
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif()
# -----------------------------------------------------------------------------
set(PATH_BIN "${CMAKE_INSTALL_PREFIX}/bin")
set(PATH_INC "${INCLUDE_INSTALL_DIR}")
set(PATH_CFG "${SYSCONF_INSTALL_DIR}")
set(PATH_RUN "/var/run")
set(PATH_LIB "${LIB_INSTALL_DIR}")
set(PATH_LOG "/var/log")
set(PATH_RES "${SHARE_INSTALL_PREFIX}")
set(PATH_LNG "${SHARE_INSTALL_PREFIX}/locale")
MESSAGE( STATUS "Paths:")
MESSAGE( STATUS " Prefix: ${CMAKE_INSTALL_PREFIX}" )
MESSAGE( STATUS " Binaries: ${PATH_BIN}" )
MESSAGE( STATUS " Configuration: ${PATH_CFG}" )
MESSAGE( STATUS " Libraries: ${PATH_LIB}" )
MESSAGE( STATUS " Includes: ${PATH_INC}" )
MESSAGE( STATUS " Run: ${PATH_RUN}" )
MESSAGE( STATUS " Log Files: ${PATH_LOG}" )
MESSAGE( STATUS " Resources: ${PATH_RES}" )
MESSAGE( STATUS " Locale Files: ${PATH_LNG}" )
MESSAGE( STATUS "")
# Compiler's Definitions ------------------------------------------------------
add_definitions(
-DPREFIX="${CMAKE_INSTALL_PREFIX}"
-DPATH_BIN="${PATH_BIN}"
-DPATH_CFG="${PATH_CFG}"
-DPATH_INC="${PATH_INC}"
-DPATH_LIB="${PATH_LIB}"
-DPATH_RUN="${PATH_RUN}"
-DPATH_LOG="${PATH_LOG}"
-DPATH_LNG="${PATH_LNG}"
-DPATH_RES="${PATH_RES}"
)
# -----------------------------------------------------------------------------