-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert one off macros to CMake include files
- Loading branch information
Showing
7 changed files
with
57 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Set the destination directories for installing stuff. | ||
# Sets PDAL_LIB_INSTALL_DIR. Install libraries here. | ||
# Sets PDAL_BIN_INSTALL_DIR. Install binaries here. | ||
# Sets PDAL_INCLUDE_INSTALL_DIR. Install include files here, preferably in a | ||
# subdirectory named after the library in question (e.g. | ||
# "registration/blorgle.h") | ||
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) | ||
if (NOT DEFINED PDAL_LIB_INSTALL_DIR) | ||
if (DEFINED CMAKE_INSTALL_LIBDIR) | ||
set(PDAL_LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") | ||
else() | ||
set(PDAL_LIB_INSTALL_DIR "lib") | ||
endif() | ||
endif () | ||
set(PDAL_DOC_INCLUDE_DIR | ||
"share/doc/${PROJECT_NAME_LOWER}-${PDAL_VERSION_MAJOR}.${PDAL_VERSION_MINOR}") | ||
set(PDAL_BIN_INSTALL_DIR "bin") | ||
set(PDAL_PLUGIN_INSTALL_DIR "share/pdal/plugins") | ||
if(WIN32) | ||
set(PDALCONFIG_INSTALL_DIR "cmake") | ||
else(WIN32) | ||
set(PDALCONFIG_INSTALL_DIR | ||
"share/${PROJECT_NAME_LOWER}-${PDAL_VERSION_MAJOR}.${PDAL_VERSION_MINOR}") | ||
endif(WIN32) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Get the operating system information. Generally, CMake does a good job of | ||
# this. Sometimes, though, it doesn't give enough information. These steps will | ||
# distinguish between the UNIX variants. Otherwise, use the CMake variables | ||
# such as WIN32 and APPLE and CYGWIN. | ||
# Sets OS_IS_64BIT if the operating system is 64-bit. | ||
# Sets LINUX if the operating system is Linux. | ||
string(REGEX MATCH "Linux" OS_IS_LINUX ${CMAKE_SYSTEM_NAME}) | ||
if(CMAKE_SIZEOF_VOID_P EQUAL 8) | ||
set(OS_IS_64BIT TRUE) | ||
else(CMAKE_SIZEOF_VOID_P EQUAL 8) | ||
set(OS_IS_64BIT FALSE) | ||
endif(CMAKE_SIZEOF_VOID_P EQUAL 8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Find version components | ||
string(REGEX REPLACE "^([0-9]+).*" "\\1" | ||
PDAL_VERSION_MAJOR "${PDAL_VERSION_STRING}") | ||
string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" | ||
PDAL_VERSION_MINOR "${PDAL_VERSION_STRING}") | ||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" | ||
PDAL_VERSION_PATCH "${PDAL_VERSION_STRING}") | ||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+(.*)" "\\1" | ||
PDAL_CANDIDATE_VERSION "${PDAL_VERSION_STRING}") |