Skip to content

Commit

Permalink
Merge pull request #692 from PDAL/make-install
Browse files Browse the repository at this point in the history
Get installer working with new directory structure.
  • Loading branch information
connormanning committed Jan 10, 2015
2 parents f37c31d + 880b81f commit 1c016a7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -49,6 +49,7 @@ SET(PDAL_C_LIB_SOVERSION ${PDAL_VERSION_MAJOR})

# Name of C++ library
set(PDAL_LIB_NAME pdalcpp)
set(PDAL_UTIL_LIB_NAME pdal_util)

set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)

Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Expand Up @@ -234,13 +234,13 @@ if (PDAL_HAVE_LIBXML2)
target_link_libraries(${PDAL_LIB_NAME} ${LIBXML2_LIBRARIES})
endif()

target_link_libraries(${PDAL_LIB_NAME}
target_link_libraries(${PDAL_LIB_NAME}
${CMAKE_THREAD_LIBS_INIT}
${GEOTIFF_LIBRARY}
${GDAL_LIBRARY}
${GEOS_LIBRARY}
${ZLIB_LIBRARIES}
PdalUtil
${PDAL_UTIL_LIB_NAME}
)

target_link_libraries(${PDAL_LIB_NAME} ${Boost_LIBRARIES})
Expand Down
3 changes: 1 addition & 2 deletions tools/lasdump/CMakeLists.txt
Expand Up @@ -12,7 +12,6 @@ if(NOT ROOT_DIR)
endif()
include(${ROOT_DIR}/cmake/common.cmake NO_POLICY_SCOPE)

add_subdirectory(${PDAL_UTIL_DIR} "${CMAKE_CURRENT_BINARY_DIR}/util")
include_directories(${PDAL_UTIL_DIR} ${PDAL_INCLUDE_DIR})

#
Expand All @@ -39,7 +38,7 @@ if (LASZIP_FOUND)

add_executable(lasdump ${SOURCES} ${HEADERS})
target_link_libraries(lasdump
PdalUtil
${PDAL_UTIL_LIB_NAME}
${LASZIP_LIBRARIES}
)
endif()
Expand Down
17 changes: 16 additions & 1 deletion util/CMakeLists.txt
Expand Up @@ -6,6 +6,21 @@ if(EXISTS)
return()
endif()

add_library(PdalUtil SHARED Bounds.cpp Bounds.hpp)
set(PDAL_UTIL_HPP
"${PDAL_UTIL_DIR}/Bounds.hpp")

set(PDAL_UTIL_CPP
"${PDAL_UTIL_DIR}/Bounds.cpp")

set(PDAL_UTIL_SOURCES
${PDAL_UTIL_CPP}
${PDAL_UTIL_HPP})

PDAL_ADD_LIBRARY(${PDAL_UTIL_LIB_NAME} SHARED ${PDAL_UTIL_SOURCES})

install(DIRECTORY "${PDAL_UTIL_DIR}/"
DESTINATION "${PDAL_INCLUDE_INSTALL_DIR}"
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")

set_property(GLOBAL PROPERTY _UTIL_INCLUDED TRUE)

0 comments on commit 1c016a7

Please sign in to comment.