[CMake] remove obsolete statements/improve docs
[CMake] remove obsolete variables and improve docs [CMake] remove proj env var
This commit is contained in:
parent
f0940c2075
commit
7a7a8125a9
23 changed files with 13 additions and 67 deletions
|
@ -22,15 +22,13 @@ include(MapnikOption)
|
|||
include(MapnikMinimumVersions)
|
||||
include(MapnikFindPackage)
|
||||
include(MapnikInstall)
|
||||
include(CTest)
|
||||
|
||||
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")
|
||||
mapnik_option(COPY_LIBRARIES_FOR_EXECUTABLES "copies required shared libaries (only windows) to the executable build directory" OFF)
|
||||
mapnik_option(COPY_FONTS_AND_PLUGINS_FOR_EXECUTABLES "copies required plugins and fonts into the executable build directory" ON)
|
||||
include(CTest)
|
||||
add_feature_info(BUILD_TESTING BUILD_TESTING "Adds tests")
|
||||
|
||||
mapnik_option(INSTALL_DEPENDENCIES "if ON, all dependencies (eg. required dlls) will be copied into CMAKE_INSTALL_PREFIX/MAPNIK_BIN_DIR." ON)
|
||||
|
||||
mapnik_option(BUILD_SHARED_LIBS "build mapnik dynamic(ON) or static(OFF)" ON)
|
||||
add_feature_info(BUILD_TESTING BUILD_TESTING "Adds tests")
|
||||
mapnik_option(USE_EXTERNAL_MAPBOX_GEOMETRY "Use a external mapnik/geometry.hpp. If off, use the submodule" OFF)
|
||||
mapnik_option(USE_EXTERNAL_MAPBOX_POLYLABEL "Use a external mapnik/polylabel. If off, use the submodule" OFF)
|
||||
mapnik_option(USE_EXTERNAL_MAPBOX_PROTOZERO "Use a external mapnik/protozero. If off, use the submodule" OFF)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(mapnik-demo)
|
||||
|
||||
add_executable(mapnik-demo rundemo.cpp)
|
||||
set_target_properties(mapnik-demo PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}"
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(mapnik-viewer)
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ Make sure that all dependencies are installed.
|
|||
All available cmake options are listed at the top of [CMakeLists.txt](../CMakeLists.txt).
|
||||
Pass your options while configuring e.g.: `cmake -DBUILD_DEMO_VIEWER=OFF ..` to disable the build of the demo viewer application.
|
||||
|
||||
To quickstart open a console in the root mapnik dir and execute the following commands: (Pass all options and dependency dirs after `-DBUILD_TEST=OFF`)
|
||||
To quickstart open a console in the root mapnik dir and execute the following commands: (Pass all options and dependency dirs after `-DBUILD_TESTING=OFF`)
|
||||
```
|
||||
> cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TEST=OFF
|
||||
> cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF
|
||||
> cmake --build build --target install
|
||||
```
|
||||
|
||||
|
@ -64,20 +64,19 @@ This could look like this:
|
|||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "vcpkg-x64-win-debug",
|
||||
"inherits": "windows-default-debug",
|
||||
"name": "vcpkg",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "<path-to-vcpkg>/scripts/buildsystems/vcpkg.cmake",
|
||||
"ADDITIONAL_LIBARIES_PATHS":"<path-to-vcpkg>/installed/x64-windows/debug/bin"
|
||||
"CMAKE_TOOLCHAIN_FILE": "<path-to-vcpkg>/scripts/buildsystems/vcpkg.cmake"
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "vcpkg-x64-win-debug",
|
||||
"inherits": ["vcpkg", "windows-default-debug"]
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-x64-win-release",
|
||||
"inherits": "windows-default-release",
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "<path-to-vcpkg>/scripts/buildsystems/vcpkg.cmake",
|
||||
"ADDITIONAL_LIBARIES_PATHS":"<path-to-vcpkg>/installed/x64-windows/bin"
|
||||
}
|
||||
"inherits": ["vcpkg", "windows-default-release"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(input-csv)
|
||||
|
||||
add_library(input-csv MODULE
|
||||
csv_datasource.cpp
|
||||
csv_featureset.cpp
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(input-gdal)
|
||||
|
||||
find_package(GDAL REQUIRED)
|
||||
|
||||
add_library(input-gdal MODULE
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(input-geobuf)
|
||||
|
||||
add_library(input-geobuf MODULE
|
||||
geobuf_datasource.cpp
|
||||
geobuf_featureset.cpp
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(input-geojson)
|
||||
|
||||
add_library(input-geojson MODULE
|
||||
geojson_datasource.cpp
|
||||
geojson_featureset.cpp
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(input-ogr)
|
||||
|
||||
find_package(GDAL REQUIRED)
|
||||
|
||||
add_library(input-ogr MODULE
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(input-pgraster)
|
||||
|
||||
find_package(PostgreSQL REQUIRED)
|
||||
|
||||
add_library(input-pgraster MODULE
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(input-postgis)
|
||||
|
||||
find_package(PostgreSQL REQUIRED)
|
||||
|
||||
add_library(input-postgis MODULE
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(input-raster)
|
||||
|
||||
add_library(input-raster MODULE
|
||||
raster_datasource.cpp
|
||||
raster_featureset.cpp
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(input-shape)
|
||||
|
||||
add_library(input-shape MODULE
|
||||
dbfile.cpp
|
||||
dbf_test.cpp
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(input-sqlite)
|
||||
|
||||
find_package(SQLite3 REQUIRED)
|
||||
|
||||
add_library(input-sqlite MODULE
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(input-topojson)
|
||||
|
||||
add_library(input-topojson MODULE
|
||||
topojson_datasource.cpp
|
||||
topojson_featureset.cpp
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(mapnik-test)
|
||||
|
||||
find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options)
|
||||
find_package(PostgreSQL REQUIRED)
|
||||
|
||||
|
@ -194,7 +192,6 @@ target_link_libraries(mapnik-test-visual PRIVATE
|
|||
)
|
||||
target_include_directories(mapnik-test-visual PRIVATE "${catch2_SOURCE_DIR}/single_include/catch2" ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
include(CTest)
|
||||
include("${catch2_SOURCE_DIR}/contrib/Catch.cmake")
|
||||
include("${catch2_SOURCE_DIR}/contrib/ParseAndAddCatchTests.cmake")
|
||||
|
||||
|
@ -204,14 +201,6 @@ file(COPY unit/data DESTINATION "${MAPNIK_OUTPUT_DIR}/test/unit")
|
|||
file(COPY "${mapnik_SOURCE_DIR}/demo/data" DESTINATION "${MAPNIK_OUTPUT_DIR}/demo")
|
||||
add_dependencies(mapnik-test-unit mapnik-index shapeindex)
|
||||
|
||||
set(m_proj_test_env "")
|
||||
if(DEFINED PROJ_LIB)
|
||||
set(m_proj_test_env "PROJ_LIB=${PROJ_LIB}")
|
||||
elseif(DEFINED ENV{PROJ_LIB})
|
||||
set(m_proj_test_env "PROJ_LIB=$ENV{PROJ_LIB}")
|
||||
endif()
|
||||
message(STATUS "using proj lib for unit tests: ${m_proj_test_env}")
|
||||
|
||||
if(WIN32)
|
||||
set(m_test_path "\$<JOIN:\$<SHELL_PATH:$<TARGET_FILE_DIR:mapnik-index>;$<TARGET_FILE_DIR:shapeindex>;$ENV{PATH}>,\\\\\\\\\;>")
|
||||
else()
|
||||
|
@ -223,7 +212,6 @@ catch_discover_tests(mapnik-test-unit
|
|||
PROPERTIES
|
||||
ENVIRONMENT
|
||||
"PATH=${m_test_path}"
|
||||
${m_proj_test_env}
|
||||
)
|
||||
catch_discover_tests(agg_rasterizer_integer_overflow_test WORKING_DIRECTORY "${MAPNIK_OUTPUT_DIR}")
|
||||
catch_discover_tests(datasource_registration_test WORKING_DIRECTORY "${MAPNIK_OUTPUT_DIR}")
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(geometry_to_wkb)
|
||||
|
||||
add_executable(geometry_to_wkb main.cpp)
|
||||
|
||||
target_link_libraries(geometry_to_wkb PRIVATE mapnik::mapnik)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(mapnik-index)
|
||||
|
||||
find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options)
|
||||
|
||||
add_executable(mapnik-index
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(mapnik-render)
|
||||
|
||||
find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options)
|
||||
|
||||
add_executable(mapnik-render mapnik-render.cpp)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(ogrindex)
|
||||
|
||||
add_executable(ogrindex ogrindex.cpp)
|
||||
|
||||
target_link_libraries(ogrindex PRIVATE mapnik::mapnik)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
project(pgsql2sqlite)
|
||||
find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options)
|
||||
find_package(SQLite3 REQUIRED)
|
||||
find_package(PostgreSQL REQUIRED)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(shapeindex)
|
||||
|
||||
find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options)
|
||||
|
||||
add_executable(shapeindex
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
project(svg2png)
|
||||
|
||||
find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options)
|
||||
|
||||
add_executable(svg2png
|
||||
|
|
Loading…
Reference in a new issue