Skip to content

Commit

Permalink
Remove GNUInstallDirs as its part of another PR and not necessary here.
Browse files Browse the repository at this point in the history
  • Loading branch information
larshg committed Feb 12, 2024
1 parent 614f196 commit 47db731
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 35 deletions.
2 changes: 1 addition & 1 deletion cmake/pcl_pclconfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ include(CMakePackageConfigHelpers)

configure_package_config_file(PCLConfig.cmake.in
${PCL_BINARY_DIR}/PCLConfig.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
INSTALL_DESTINATION cmake
PATH_VARS INCLUDE_INSTALL_DIR)

write_basic_package_version_file(
Expand Down
48 changes: 14 additions & 34 deletions cmake/pcl_utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,44 +91,24 @@ endmacro()
# subdirectory named after the library in question (e.g.
# "registration/blorgle.h")
macro(SET_INSTALL_DIRS)
include(GNUInstallDirs)

if(NOT DEFINED LIB_INSTALL_DIR)
set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
endif()

if(NOT ANDROID)
set(INCLUDE_INSTALL_ROOT
"${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}")
else()
set(INCLUDE_INSTALL_ROOT ${CMAKE_INSTALL_INCLUDEDIR}) # Android, don't put into subdir
set(LIB_INSTALL_DIR "lib")
endif()

if(NOT DEFINED INCLUDE_INSTALL_DIR)
set(INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_ROOT}/pcl")
endif()

if(NOT DEFINED DOC_INSTALL_DIR)
set(DOC_INSTALL_DIR "${CMAKE_INSTALL_DOCDIR}")
endif()

if(NOT DEFINED BIN_INSTALL_DIR)
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
endif()

if(NOT DEFINED PKGCFG_INSTALL_DIR)
set(PKGCFG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endif()

if(NOT DEFINED PCLCONFIG_INSTALL_DIR)
if(WIN32 AND NOT MINGW)
set(PCLCONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake")
if(NOT ANDROID)
set(INCLUDE_INSTALL_ROOT
"include/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}")
else()
# Most distributions install cmake config files in /usr/lib*/cmake
# and not in /usr/share/cmake.
set(PCLCONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}")
set(INCLUDE_INSTALL_ROOT "include") # Android, don't put into subdir
endif()
endif()
set(INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_ROOT}/pcl")
set(DOC_INSTALL_DIR "share/doc/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}")
set(BIN_INSTALL_DIR "bin")
set(PKGCFG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig")
if(WIN32 AND NOT MINGW)
set(PCLCONFIG_INSTALL_DIR "cmake")
else()
set(PCLCONFIG_INSTALL_DIR "share/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}")
endif()
endmacro()


Expand Down

0 comments on commit 47db731

Please sign in to comment.