added cache variable for lib/bin/archive output
This commit is contained in:
parent
37dd7c17df
commit
f432018bdb
15 changed files with 59 additions and 23 deletions
|
@ -8,7 +8,7 @@ project(mapnik
|
|||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
option(BUILD_SHARED_LIBS "build mapnik dynamic" ON)
|
||||
option(BUILD_SHARED_LIBS "build mapnik dynamic(ON) or static(OFF)" ON)
|
||||
option(BUILD_TEST "builds the tests" ON)
|
||||
option(USE_EXTERNAL_MAPBOX_GEOMETRY "Use a external mapnik/geometry.hpp. If off, use the submodule" OFF)
|
||||
option(USE_EXTERNAL_MAPBOX_POLYLABEL "Use a external mapnik/polylabel. If off, use the submodule" OFF)
|
||||
|
@ -63,6 +63,23 @@ message("Installing fonts to ${ABSOLUTE_FONTS_INSTALL_DIR}")
|
|||
set(CMAKE_CXX_STANDARD 14 CACHE STRING "Sets the c++ standard. c++11 is minimum.")
|
||||
message("Using c++${CMAKE_CXX_STANDARD}")
|
||||
|
||||
if(WIN32)
|
||||
set(DEFAULT_BIN_DIR bin)
|
||||
set(DEFAULT_LIB_DIR lib)
|
||||
set(DEFAULT_ARCHIVE_DIR lib)
|
||||
else()
|
||||
include(GNUInstallDirs)
|
||||
set(DEFAULT_BIN_DIR ${CMAKE_INSTALL_BINDIR})
|
||||
set(DEFAULT_LIB_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||
set(DEFAULT_ARCHIVE_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
# https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#runtime-output-artifacts
|
||||
set(MAPNIK_BIN_DIR ${DEFAULT_BIN_DIR} CACHE STRING "Install directory for binaries")
|
||||
# https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#library-output-artifacts
|
||||
set(MAPNIK_LIB_DIR ${DEFAULT_LIB_DIR} CACHE STRING "Install directory for libraries")
|
||||
# https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#archive-output-artifacts
|
||||
set(MAPNIK_ARCHIVE_DIR ${DEFAULT_ARCHIVE_DIR} CACHE STRING "Install directory for archives")
|
||||
|
||||
find_package(Boost 1.74 REQUIRED COMPONENTS filesystem system regex)
|
||||
find_package(ICU REQUIRED COMPONENTS uc)
|
||||
find_package(Freetype REQUIRED)
|
||||
|
|
|
@ -5,7 +5,7 @@ add_executable(mapnik-demo rundemo.cpp)
|
|||
target_link_libraries(mapnik-demo PRIVATE mapnik::headers mapnik::agg mapnik::mapnik)
|
||||
|
||||
install(TARGETS mapnik-demo
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${MAPNIK_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${MAPNIK_ARCHIVE_DIR}
|
||||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
)
|
||||
|
|
|
@ -40,7 +40,7 @@ fonts/1/dir=${ABSOLUTE_FONTS_INSTALL_DIR}"
|
|||
)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/viewer.ini DESTINATION bin)
|
||||
install(TARGETS mapnik-viewer
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${MAPNIK_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${MAPNIK_ARCHIVE_DIR}
|
||||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
)
|
||||
|
|
1
deps/vcpkg
vendored
Submodule
1
deps/vcpkg
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 6e073f168652a551d8f29d19481ec67be3fccac8
|
|
@ -299,9 +299,9 @@ target_link_libraries(mapnik PRIVATE
|
|||
|
||||
install(TARGETS mapnik
|
||||
EXPORT MapnikTargets
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${MAPNIK_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${MAPNIK_ARCHIVE_DIR}
|
||||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
INCLUDES DESTINATION include/
|
||||
PUBLIC_HEADER DESTINATION include/
|
||||
)
|
||||
|
|
|
@ -28,7 +28,7 @@ target_link_libraries(json PRIVATE mapnik::headers ${ICUU_LIB})
|
|||
|
||||
install(TARGETS json
|
||||
EXPORT MapnikTargets
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${MAPNIK_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${MAPNIK_ARCHIVE_DIR}
|
||||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
)
|
||||
|
|
|
@ -21,7 +21,7 @@ target_link_libraries(wkt PRIVATE mapnik::headers)
|
|||
|
||||
install(TARGETS wkt
|
||||
EXPORT MapnikTargets
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${MAPNIK_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${MAPNIK_ARCHIVE_DIR}
|
||||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
)
|
||||
|
|
|
@ -16,6 +16,10 @@ set(CATCH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|||
add_library(Catch INTERFACE)
|
||||
target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR})
|
||||
|
||||
# for cmake 3.19+ https://cmake.org/cmake/help/git-stage/policy/CMP0110.html
|
||||
# might not be needed if catch updates its cmakes
|
||||
cmake_policy(SET CMP0110 OLD)
|
||||
|
||||
add_executable(mapnik-test-unit
|
||||
unit/run.cpp
|
||||
unit/color/css_color.cpp
|
||||
|
|
|
@ -9,5 +9,7 @@ target_link_libraries(geometry_to_wkb PRIVATE
|
|||
|
||||
install(TARGETS geometry_to_wkb
|
||||
EXPORT MapnikTargets
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${MAPNIK_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${MAPNIK_ARCHIVE_DIR}
|
||||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
)
|
|
@ -17,5 +17,7 @@ target_link_libraries(mapnik-index PRIVATE
|
|||
)
|
||||
install(TARGETS mapnik-index
|
||||
EXPORT MapnikTargets
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${MAPNIK_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${MAPNIK_ARCHIVE_DIR}
|
||||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
)
|
|
@ -11,5 +11,7 @@ target_link_libraries(mapnik-render PRIVATE
|
|||
)
|
||||
install(TARGETS mapnik-render
|
||||
EXPORT MapnikTargets
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${MAPNIK_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${MAPNIK_ARCHIVE_DIR}
|
||||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
)
|
|
@ -7,5 +7,7 @@ target_link_libraries(ogrindex PRIVATE mapnik::headers mapnik::mapnik)
|
|||
|
||||
install(TARGETS ogrindex
|
||||
EXPORT MapnikTargets
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${MAPNIK_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${MAPNIK_ARCHIVE_DIR}
|
||||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
)
|
||||
|
|
|
@ -19,5 +19,7 @@ target_link_libraries(pgsql2sqlite PRIVATE
|
|||
|
||||
install(TARGETS pgsql2sqlite
|
||||
EXPORT MapnikTargets
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${MAPNIK_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${MAPNIK_ARCHIVE_DIR}
|
||||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
)
|
||||
|
|
|
@ -14,5 +14,7 @@ target_link_libraries(shapeindex PRIVATE
|
|||
)
|
||||
install(TARGETS shapeindex
|
||||
EXPORT MapnikTargets
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${MAPNIK_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${MAPNIK_ARCHIVE_DIR}
|
||||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
)
|
|
@ -14,5 +14,7 @@ target_link_libraries(svg2png PRIVATE
|
|||
)
|
||||
install(TARGETS svg2png
|
||||
EXPORT MapnikTargets
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${MAPNIK_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${MAPNIK_ARCHIVE_DIR}
|
||||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
)
|
Loading…
Reference in a new issue