some last minor improvements
This commit is contained in:
parent
0198cad883
commit
02180115bf
6 changed files with 127 additions and 66 deletions
|
@ -22,7 +22,7 @@ include(MapnikCopyDependencies)
|
|||
include(MapnikInstall)
|
||||
|
||||
set(ADDITIONAL_LIBARIES_PATHS "" CACHE STRING "only used on windows. Pass directories containing the dlls that are missing. You can ignore this, if the build (verify_app step) runs successfully")
|
||||
option(COPY_LIBRARIES_FOR_EXECUTABLES "copies required shared libaries (only windows) to the executable build directory" ON)
|
||||
option(COPY_LIBRARIES_FOR_EXECUTABLES "copies required shared libaries (only windows) to the executable build directory" OFF)
|
||||
option(COPY_FONTS_AND_PLUGINS_FOR_EXECUTABLES "copies required plugins and fonts into the executable build directory" ON)
|
||||
option(INSTALL_DEPENDENCIES "if ON, all dependencies (eg. required dlls) will be copied into CMAKE_INSTALL_PREFIX/MAPNIK_BIN_DIR." ON)
|
||||
|
||||
|
|
|
@ -7,11 +7,41 @@
|
|||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "linux-clang",
|
||||
"displayName": "Linux clang",
|
||||
"name": "use-ninja",
|
||||
"hidden": true,
|
||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||
"generator": "Ninja",
|
||||
"generator": "Ninja"
|
||||
},
|
||||
{
|
||||
"name": "default-build-dir",
|
||||
"hidden": true,
|
||||
"binaryDir": "${sourceDir}/build/${presetName}"
|
||||
},
|
||||
{
|
||||
"name": "debug-build",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"USE_DEBUG_OUTPUT": "ON",
|
||||
"USE_LOG": "ON",
|
||||
"USE_LOG_SEVERITY": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "release-build",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"USE_DEBUG_OUTPUT": "OFF",
|
||||
"USE_LOG": "OFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "use-clang",
|
||||
"hidden": true,
|
||||
"inherits": [
|
||||
"default-build-dir",
|
||||
"use-ninja"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "clang",
|
||||
"CMAKE_CXX_COMPILER": "clang++",
|
||||
|
@ -21,60 +51,76 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-debug",
|
||||
"displayName": "Linux clang debug",
|
||||
"inherits": "linux-clang",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"USE_DEBUG_OUTPUT": "ON",
|
||||
"USE_LOG": "ON",
|
||||
"USE_LOG_SEVERITY": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-release",
|
||||
"displayName": "Linux clang release",
|
||||
"inherits": "linux-clang",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-gcc",
|
||||
"displayName": "Linux gcc",
|
||||
"name": "use-gcc",
|
||||
"hidden": true,
|
||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||
"generator": "Ninja",
|
||||
"inherits": [
|
||||
"default-build-dir",
|
||||
"use-ninja"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "gcc",
|
||||
"CMAKE_CXX_COMPILER": "g++"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "use-msvc-cl",
|
||||
"hidden": true,
|
||||
"inherits": [
|
||||
"default-build-dir",
|
||||
"use-ninja"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "cl",
|
||||
"CMAKE_CXX_COMPILER": "cl"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "use-msvc-clang-cl",
|
||||
"hidden": true,
|
||||
"inherits": [
|
||||
"default-build-dir",
|
||||
"use-ninja"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "clang-cl",
|
||||
"CMAKE_CXX_COMPILER": "clang-cl"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-debug",
|
||||
"displayName": "Linux clang debug",
|
||||
"inherits": [
|
||||
"use-clang",
|
||||
"debug-build"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-release",
|
||||
"displayName": "Linux clang release",
|
||||
"inherits": [
|
||||
"use-clang",
|
||||
"release-build"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "linux-gcc-debug",
|
||||
"displayName": "Linux gcc debug",
|
||||
"inherits": "linux-gcc",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"USE_DEBUG_OUTPUT": "ON",
|
||||
"USE_LOG": "ON",
|
||||
"USE_LOG_SEVERITY": "0"
|
||||
}
|
||||
"inherits": [
|
||||
"use-gcc",
|
||||
"debug-build"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "linux-gcc-release",
|
||||
"displayName": "Linux gcc release",
|
||||
"inherits": "linux-gcc",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
"inherits": [
|
||||
"use-gcc",
|
||||
"release-build"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "windows-default",
|
||||
"displayName": "Windows x64 Debug",
|
||||
"name": "windows-arch-x64",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||
"architecture": {
|
||||
"value": "x64",
|
||||
"strategy": "external"
|
||||
|
@ -82,11 +128,16 @@
|
|||
"toolset": {
|
||||
"value": "host=x64",
|
||||
"strategy": "external"
|
||||
}
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "cl",
|
||||
"CMAKE_CXX_COMPILER": "cl"
|
||||
},
|
||||
{
|
||||
"name": "windows-default",
|
||||
"displayName": "Windows x64 Debug",
|
||||
"hidden": true,
|
||||
"inherits": [
|
||||
"use-msvc-cl",
|
||||
"windows-arch-x64"
|
||||
],
|
||||
"vendor": {
|
||||
"microsoft.com/VisualStudioSettings/CMake/1.0": {
|
||||
"hostOS": [
|
||||
|
@ -98,21 +149,18 @@
|
|||
{
|
||||
"name": "windows-default-debug",
|
||||
"displayName": "Windows x64 Debug",
|
||||
"inherits": "windows-default",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"USE_DEBUG_OUTPUT": "ON",
|
||||
"USE_LOG": "ON",
|
||||
"USE_LOG_SEVERITY": "0"
|
||||
}
|
||||
"inherits": [
|
||||
"windows-default",
|
||||
"debug-build"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "windows-default-release",
|
||||
"displayName": "Windows x64 Release",
|
||||
"inherits": "windows-default",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
"inherits": [
|
||||
"windows-default",
|
||||
"release-build"
|
||||
]
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
|
|
|
@ -96,3 +96,9 @@ If your libraries are not in the global search paths, you could add a own `CMake
|
|||
]
|
||||
}
|
||||
```
|
||||
|
||||
Build with:
|
||||
```
|
||||
$ cmake --preset <configure_preset_name>
|
||||
$ cmake --build --preset <build_preset_name>
|
||||
```
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
add_subdirectory(json)
|
||||
add_subdirectory(wkt)
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
|
||||
endif()
|
||||
|
||||
set(MAPNIK_SOURCES
|
||||
cairo_io.cpp
|
||||
color_factory.cpp
|
||||
|
@ -296,10 +292,19 @@ target_link_libraries(mapnik PRIVATE
|
|||
)
|
||||
|
||||
set_target_properties(mapnik PROPERTIES
|
||||
DEBUG_POSTFIX ${MAPNIK_DEBUG_POSTFIX}
|
||||
DEBUG_POSTFIX "${MAPNIK_DEBUG_POSTFIX}"
|
||||
OUTPUT_NAME "mapnik"
|
||||
PREFIX "lib"
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
# disable some msvc warnings and enable bigobj
|
||||
# 4068 will warn about unknown definitions. Would not be needed if https://github.com/mapbox/geometry.hpp/pull/69 is merged.
|
||||
# 4661 warns about enum definitions. should be investigated at some point
|
||||
# 4910 warns about extern and dllexport at the same time. should be investigated at some point
|
||||
target_compile_options(mapnik PUBLIC "/bigobj" "/wd4068" "/wd4661" "/wd4910")
|
||||
endif()
|
||||
|
||||
install(TARGETS mapnik
|
||||
EXPORT MapnikTargets
|
||||
LIBRARY DESTINATION ${MAPNIK_LIB_DIR}
|
||||
|
|
|
@ -25,8 +25,9 @@ target_include_directories(json PRIVATE
|
|||
target_link_libraries(json PRIVATE mapnik::core ${ICUU_LIB})
|
||||
|
||||
set_target_properties(json PROPERTIES
|
||||
DEBUG_POSTFIX ${MAPNIK_DEBUG_POSTFIX}
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
DEBUG_POSTFIX "${MAPNIK_DEBUG_POSTFIX}"
|
||||
OUTPUT_NAME "json"
|
||||
PREFIX "libmapnik-"
|
||||
)
|
||||
|
||||
|
|
|
@ -17,8 +17,9 @@ target_include_directories(wkt PRIVATE
|
|||
target_link_libraries(wkt PRIVATE mapnik::core)
|
||||
|
||||
set_target_properties(wkt PROPERTIES
|
||||
DEBUG_POSTFIX ${MAPNIK_DEBUG_POSTFIX}
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
DEBUG_POSTFIX "${MAPNIK_DEBUG_POSTFIX}"
|
||||
OUTPUT_NAME "wkt"
|
||||
PREFIX "libmapnik-"
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue