Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ endif()
# Project #
###############################################################################
project(fastcdr VERSION 2.3.4 LANGUAGES CXX)
include(GNUInstallDirs)

set(PROJECT_NAME_STYLED "FastCDR")
set(PROJECT_NAME_LARGE "Fast CDR")
Expand Down Expand Up @@ -90,20 +91,16 @@ option(APPEND_PROJECT_NAME_TO_INCLUDEDIR
overriding this package from a merged catkin, ament, or colcon workspace."
OFF)

set(BIN_INSTALL_DIR bin/ CACHE PATH "Installation directory for binaries")
set(_include_dir "include/")
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH "Installation directory for binaries")
set(_include_dir "${CMAKE_INSTALL_INCLUDEDIR}")
if(APPEND_PROJECT_NAME_TO_INCLUDEDIR)
string(APPEND _include_dir "${PROJECT_NAME}/")
endif()
set(INCLUDE_INSTALL_DIR "${_include_dir}" CACHE PATH "Installation directory for C++ headers")
unset(_include_dir)
set(LIB_INSTALL_DIR lib${LIB_SUFFIX}/ CACHE PATH "Installation directory for libraries")
set(DATA_INSTALL_DIR share/ CACHE PATH "Installation directory for data")
if(WIN32)
set(DOC_DIR "doc")
else()
set(DOC_DIR "${DATA_INSTALL_DIR}/doc")
endif()
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Installation directory for libraries")
set(DATA_INSTALL_DIR "${CMAKE_INSTALL_DATAROOTDIR}" CACHE PATH "Installation directory for data")
set(DOC_DIR "${CMAKE_INSTALL_DOCDIR}")
set(DOC_INSTALL_DIR ${DOC_DIR} CACHE PATH "Installation directory for documentation")
set(LICENSE_INSTALL_DIR ${DATA_INSTALL_DIR}/${PROJECT_NAME} CACHE PATH "Installation directory for licenses")

Expand Down