Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from cffk/master
Patches to cmake configuration for libLAS 1.7.0
- Loading branch information
Showing
7 changed files
with
108 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
############################################################################# | ||
# Config file generation and installation | ||
############################################################################# | ||
|
||
# Set where cmake will install liblas-config.cmake. It's installed in | ||
# ${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR} and ${PROJECT_ROOT_DIR} | ||
# is the relative path to the root from there. | ||
if (NOT WIN32) | ||
set(INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}-${VERSION}") | ||
set (PROJECT_ROOT_DIR "../../..") | ||
else () | ||
set(INSTALL_CMAKE_DIR "cmake") | ||
set (PROJECT_ROOT_DIR "..") | ||
endif () | ||
|
||
# Now create the liblas-config files using the .in templates | ||
configure_file (liblas-config.cmake.in | ||
${CMAKE_CURRENT_BINARY_DIR}/liblas-config.cmake @ONLY) | ||
configure_file (liblas-config-version.cmake.in | ||
${CMAKE_CURRENT_BINARY_DIR}/liblas-config-version.cmake @ONLY) | ||
|
||
# Install the liblas-config files so that other modules can find this | ||
# project using 'find_package(libLAS)' | ||
install (FILES | ||
"${CMAKE_CURRENT_BINARY_DIR}/liblas-config.cmake" | ||
"${CMAKE_CURRENT_BINARY_DIR}/liblas-config-version.cmake" | ||
DESTINATION "${INSTALL_CMAKE_DIR}") | ||
|
||
# Make information about libLAS available. The depends target is | ||
# defined in ../src/CMakeLists.txt | ||
install (EXPORT depends | ||
FILE "liblas-depends.cmake" | ||
DESTINATION "${INSTALL_CMAKE_DIR}") |
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,18 @@ | ||
# Version checking for libLAS | ||
|
||
set(PACKAGE_VERSION "@VERSION@") | ||
set(PACKAGE_VERSION_MAJOR "@LIBLAS_VERSION_MAJOR@") | ||
set(PACKAGE_VERSION_MINOR "@LIBLAS_VERSION_MINOR@") | ||
set(PACKAGE_VERSION_PATCH "@LIBLAS_VERSION_PATCH@") | ||
|
||
if (WIN32 AND NOT "${CMAKE_GENERATOR}" STREQUAL "@CMAKE_GENERATOR@") | ||
# Reject if there's a mismatch on compiler versions (Windows only) | ||
set (PACKAGE_VERSION_UNSUITABLE TRUE) | ||
elseif (PACKAGE_FIND_VERSION) | ||
if (${PACKAGE_FIND_VERSION} VERSION_EQUAL ${PACKAGE_VERSION}) | ||
set (PACKAGE_VERSION_EXACT TRUE) | ||
elseif (${PACKAGE_FIND_VERSION} VERSION_LESS ${PACKAGE_VERSION} | ||
AND ${PACKAGE_FIND_VERSION_MAJOR} EQUAL ${PACKAGE_VERSION_MAJOR}) | ||
set (PACKAGE_VERSION_COMPATIBLE TRUE) | ||
endif () | ||
endif () |
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,29 @@ | ||
# Configure libLAS package | ||
# | ||
# It defines the following variables | ||
# libLAS_FOUND = LIBLAS_FOUND - TRUE | ||
# libLAS_INCLUDE_DIRS - include directories for libLAS | ||
# libLAS_LIBRARY_DIRS - library directory | ||
# libLAS_LIBRARIES - all the libraries of the components requested | ||
# if no components specified then all found | ||
# libLAS_VERSION - libLAS library version | ||
|
||
message (STATUS "Reading ${CMAKE_CURRENT_LIST_FILE}") | ||
set (libLAS_VERSION "@PACKAGE_VERSION@") | ||
message (STATUS "libLAS configuration, version " | ||
${libLAS_VERSION}) | ||
|
||
# Tell the user project where to find our headers and libraries | ||
get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) | ||
get_filename_component (PROJECT_ROOT_DIR "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE) | ||
set (libLAS_INCLUDE_DIRS "${PROJECT_ROOT_DIR}/include") | ||
set (libLAS_LIBRARY_DIRS "${PROJECT_ROOT_DIR}/lib") | ||
|
||
include ("${_DIR}/liblas-depends.cmake") | ||
if(WIN32) | ||
set (libLAS_LIBRARIES liblas liblas_c) | ||
else() | ||
set (libLAS_LIBRARIES las las_c) | ||
endif() | ||
|
||
set (LIBLAS_FOUND TRUE) |
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