add packaging
This commit is contained in:
parent
d610671327
commit
7f2511632f
5 changed files with 25 additions and 4 deletions
|
@ -231,12 +231,12 @@ endif()
|
|||
|
||||
if(USE_PROJ)
|
||||
#https://proj.org/development/cmake.html
|
||||
mapnik_find_package(PROJ REQUIRED)
|
||||
math(EXPR MAPNIK_PROJ_VERSION "${PROJ_VERSION_MAJOR}*10000 + ${PROJ_VERSION_MINOR}*100 + ${PROJ_VERSION_PATCH}" OUTPUT_FORMAT DECIMAL)
|
||||
mapnik_find_package(PROJ4 REQUIRED)
|
||||
math(EXPR MAPNIK_PROJ_VERSION "${PROJ4_VERSION_MAJOR}*10000 + ${PROJ4_VERSION_MINOR}*100 + ${PROJ4_VERSION_PATCH}" OUTPUT_FORMAT DECIMAL)
|
||||
message(STATUS "Using mapnik PROJ version: ${MAPNIK_PROJ_VERSION}")
|
||||
list(APPEND MAPNIK_COMPILE_DEFS MAPNIK_USE_PROJ MAPNIK_PROJ_VERSION=${MAPNIK_PROJ_VERSION})
|
||||
list(APPEND MAPNIK_OPTIONAL_LIBS ${PROJ_LIBRARIES})
|
||||
list(APPEND MAPNIK_OPTIONAL_LIBS_INCLUDE ${PROJ_INCLUDE_DIRS})
|
||||
list(APPEND MAPNIK_OPTIONAL_LIBS ${PROJ4_LIBRARIES})
|
||||
list(APPEND MAPNIK_OPTIONAL_LIBS_INCLUDE ${PROJ4_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(USE_GRID_RENDERER)
|
||||
|
@ -289,6 +289,7 @@ install(TARGETS core
|
|||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
INCLUDES DESTINATION include/
|
||||
PUBLIC_HEADER DESTINATION include/
|
||||
COMPONENT mapnik
|
||||
)
|
||||
|
||||
add_subdirectory(deps)
|
||||
|
@ -341,3 +342,6 @@ install(DIRECTORY deps/mapnik TYPE INCLUDE)
|
|||
install(DIRECTORY fonts/ DESTINATION ${FONTS_INSTALL_DIR} FILES_MATCHING PATTERN "*.py" EXCLUDE PATTERN "*")
|
||||
|
||||
mapnik_install_targets()
|
||||
|
||||
|
||||
include(pack)
|
||||
|
|
14
cmake/pack.cmake
Normal file
14
cmake/pack.cmake
Normal file
|
@ -0,0 +1,14 @@
|
|||
include(InstallRequiredSystemLibraries)
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
set(CPACK_GENERATOR "TGZ")
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
\\.git/
|
||||
build/
|
||||
".*~$"
|
||||
out/
|
||||
\\.vs/
|
||||
\\.vscode/
|
||||
)
|
||||
set(CPACK_VERBATIM_VARIABLES YES)
|
||||
|
||||
include(CPack)
|
|
@ -302,6 +302,7 @@ install(TARGETS mapnik
|
|||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
INCLUDES DESTINATION include/
|
||||
PUBLIC_HEADER DESTINATION include/
|
||||
COMPONENT mapnik
|
||||
)
|
||||
|
||||
mapnik_install(TARGET mapnik ALREADY_INSTALLED)
|
||||
|
|
|
@ -33,6 +33,7 @@ install(TARGETS json
|
|||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
INCLUDES DESTINATION include/
|
||||
PUBLIC_HEADER DESTINATION include/
|
||||
COMPONENT mapnik
|
||||
)
|
||||
|
||||
mapnik_install(TARGET json)
|
||||
|
|
|
@ -25,6 +25,7 @@ install(TARGETS wkt
|
|||
RUNTIME DESTINATION ${MAPNIK_BIN_DIR}
|
||||
INCLUDES DESTINATION include/
|
||||
PUBLIC_HEADER DESTINATION include/
|
||||
COMPONENT mapnik
|
||||
)
|
||||
|
||||
mapnik_install(TARGET wkt)
|
||||
|
|
Loading…
Reference in a new issue