diff --git a/CMakeLists.txt b/CMakeLists.txt index 47bbaa15d..6d76303d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,16 +21,14 @@ include(FeatureSummary) include(MapnikOption) include(MapnikMinimumVersions) include(MapnikFindPackage) -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") -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) -mapnik_option(BUILD_TEST "builds the tests" ON) 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) @@ -109,7 +107,7 @@ set(MAPNIK_ARCHIVE_DIR ${CMAKE_INSTALL_LIBDIR} CACHE STRING "Install directory f set(MAPNIK_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR} CACHE STRING "Install directory for the headers") set(MAPNIK_CMAKE_DIR ${MAPNIK_LIB_DIR}/cmake/mapnik CACHE STRING "Install directory of the cmake targets") set(MAPNIK_PKGCONF_DIR ${MAPNIK_LIB_DIR}/pkgconfig CACHE STRING "Install directory for the .pc files for pkg-config") - +set(MAPNIK_OUTPUT_DIR "${CMAKE_BINARY_DIR}/out") if(WIN32) set(DEFAULT_PLUGINS_INSTALL_DIR ${MAPNIK_BIN_DIR}/mapnik/input) else() @@ -296,9 +294,14 @@ if(USE_WEBP) endif() if(USE_CAIRO) - mapnik_find_package(Cairo REQUIRED) + if(WIN32) + mapnik_find_package(Cairo REQUIRED) + list(APPEND MAPNIK_OPTIONAL_LIBS Cairo::Cairo) + else() + pkg_check_modules(Cairo REQUIRED IMPORTED_TARGET cairo) + list(APPEND MAPNIK_OPTIONAL_LIBS PkgConfig::Cairo) + endif() list(APPEND MAPNIK_COMPILE_DEFS HAVE_CAIRO) - list(APPEND MAPNIK_OPTIONAL_LIBS Cairo::Cairo) endif() if(USE_PROJ) @@ -372,10 +375,10 @@ add_subdirectory(demo) if(BUILD_BENCHMARK) add_subdirectory(benchmark) endif() -if(BUILD_TEST) - enable_testing() +if(BUILD_TESTING) add_subdirectory(test) endif() +file(COPY fonts DESTINATION "${MAPNIK_OUTPUT_DIR}") feature_summary(FILENAME "${CMAKE_CURRENT_BINARY_DIR}/packages.log" WHAT PACKAGES_FOUND PACKAGES_NOT_FOUND INCLUDE_QUIET_PACKAGES) diff --git a/CMakePresets.json b/CMakePresets.json index 1206a07b8..dbf9dac33 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -150,7 +150,7 @@ } }, { - "name": "windows-default-debug", + "name": "windows-debug", "displayName": "Windows x64 Debug", "inherits": [ "windows-default", @@ -158,7 +158,7 @@ ] }, { - "name": "windows-default-release", + "name": "windows-release", "displayName": "Windows x64 Release", "inherits": [ "windows-default", @@ -168,12 +168,28 @@ ], "buildPresets": [ { - "name": "windows-default", - "configurePreset": "windows-default-debug" + "name": "windows-debug", + "configurePreset": "windows-debug" }, { - "name": "linux-default", + "name": "windows-release", + "configurePreset": "windows-release" + }, + { + "name": "linux-clang-debug", "configurePreset": "linux-clang-debug" + }, + { + "name": "linux-clang-release", + "configurePreset": "linux-clang-release" + }, + { + "name": "linux-gcc-debug", + "configurePreset": "linux-gcc-debug" + }, + { + "name": "linux-gcc-release", + "configurePreset": "linux-gcc-release" } ] } diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt index 3a69241d7..60c4ff85f 100644 --- a/benchmark/CMakeLists.txt +++ b/benchmark/CMakeLists.txt @@ -32,24 +32,13 @@ function(mapnik_create_benchmark) add_executable(${TARGET_NAME} ${ARGV0}) target_include_directories(${TARGET_NAME} PRIVATE include) target_link_libraries(${TARGET_NAME} PRIVATE mapnik::agg mapnik::mapnik) - - mapnik_copy_dependencies(TARGETS ${TARGET_NAME}) + set_target_properties(${TARGET_NAME} PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" + ) endfunction() foreach(benchmark ${BENCHMARK_SRCS}) mapnik_create_benchmark(${benchmark}) endforeach() - -# we just need one target to reference the directory correctly. mapnik-benchmark-normalize_angle is just the first in BENCHMARK_SRCS -mapnik_require_fonts(TARGET mapnik-benchmark-normalize_angle DESTINATION fonts) -# copy all plugins -mapnik_copy_plugins(TARGET mapnik-benchmark-normalize_angle - DESTINATION plugins/input - PLUGINS - input-csv input-gdal input-geobuf input-geojson input-ogr input-pgraster input-postgis input-raster input-shape input-sqlite input-topojson -) -# copy all plugin dlls. -mapnik_copy_dependencies(TARGETS mapnik-benchmark-normalize_angle - PLUGINS - input-csv input-gdal input-geobuf input-geojson input-ogr input-pgraster input-postgis input-raster input-shape input-sqlite input-topojson -) diff --git a/cmake/CopyDllsForDebug.cmake b/cmake/CopyDllsForDebug.cmake deleted file mode 100644 index 3c0e118a6..000000000 --- a/cmake/CopyDllsForDebug.cmake +++ /dev/null @@ -1,38 +0,0 @@ -# This is a helper script to run BundleUtilities fixup_bundle as postbuild -# for a target. The primary use case is to copy .DLLs to the build directory for -# the Windows platform. It allows generator expressions to be used to determine -# the binary location -# -# Usage : copy_dlls_for_debug TARGET LIBS DIRS -# - TARGET : A cmake target -# - See fixup_bundle for LIBS and DIRS arguments - -if(RUN_IT) -# Script ran by the add_custom_command - include(BundleUtilities) - include(InstallRequiredSystemLibraries) - string (REPLACE " " ";" TO_FIXUP_LIBS "${TO_FIXUP_LIBS}") - string (REPLACE " " ";" TO_FIXUP_DIRS "${TO_FIXUP_DIRS}") - #message(STATUS "${TO_FIXUP_FILE} ${TO_FIXUP_LIBS} ${TO_FIXUP_DIRS}") - fixup_bundle("${TO_FIXUP_FILE}" "${TO_FIXUP_LIBS}" "${TO_FIXUP_DIRS}") -# End of script ran by the add_custom_command -else() - -set(THIS_FILE ${CMAKE_CURRENT_LIST_FILE}) -function(copy_dlls_for_debug) - set(options) - set(oneValueArgs) - set(multiValueArgs TARGETS LIBS DIRS) - cmake_parse_arguments(MAPNIK_COPY_DLLS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - if(WIN32) - foreach(_target IN LISTS MAPNIK_COPY_DLLS_TARGETS) - add_custom_command( - TARGET ${_target} POST_BUILD - COMMAND ${CMAKE_COMMAND} ARGS -DRUN_IT:BOOL=ON -DTO_FIXUP_FILE="$" -DTO_FIXUP_LIBS:STRING="${MAPNIK_COPY_DLLS_LIBS}" -DTO_FIXUP_DIRS="${MAPNIK_COPY_DLLS_DIRS}" -P "${THIS_FILE}" - COMMENT "Fixing up dependencies for ${_target}" - ) - endforeach() - endif(WIN32) -endfunction() - -endif() diff --git a/cmake/MapnikCopyDependencies.cmake b/cmake/MapnikCopyDependencies.cmake deleted file mode 100644 index 4d14174a7..000000000 --- a/cmake/MapnikCopyDependencies.cmake +++ /dev/null @@ -1,61 +0,0 @@ -function(mapnik_find_target_location) - set(options) - set(multiValueArgs TARGETS) - cmake_parse_arguments( WIG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - -endfunction() - -function(mapnik_copy_dependencies) - if(COPY_LIBRARIES_FOR_EXECUTABLES AND WIN32) - set(options) - set(oneValueArgs) - set(multiValueArgs TARGETS PLUGINS) - cmake_parse_arguments(MAPNIK_CP_DEPS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - include(CopyDllsForDebug) - foreach(TARGET IN LISTS MAPNIK_CP_DEPS_TARGETS) - add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "$" ${CMAKE_CURRENT_BINARY_DIR}) - endforeach() - - set(LIBS "") - foreach(PLUGIN IN LISTS MAPNIK_CP_DEPS_PLUGINS) - if(TARGET ${PLUGIN}) # only copy plugins that are be build - list(APPEND LIBS "$") - endif() - endforeach() - copy_dlls_for_debug(TARGETS ${MAPNIK_CP_DEPS_TARGETS} LIBS ${LIBS} DIRS ${ADDITIONAL_LIBARIES_PATHS}) - endif() -endfunction() - -function(mapnik_copy_plugins) - if(COPY_FONTS_AND_PLUGINS_FOR_EXECUTABLES) - set(options) - set(oneValueArgs TARGET DESTINATION) - set(multiValueArgs PLUGINS) - cmake_parse_arguments(MAPNIK_CP_PLG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - # copy_if_different requires a existing directory. - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${MAPNIK_CP_PLG_DESTINATION}) - foreach(PLUGIN IN LISTS MAPNIK_CP_PLG_PLUGINS) - #message(STATUS "copying plugin ${PLUGIN} to path: ${CMAKE_CURRENT_BINARY_DIR}/${MAPNIK_CP_PLG_DESTINATION}") - if(TARGET ${PLUGIN}) - add_custom_command(TARGET ${MAPNIK_CP_PLG_TARGET} POST_BUILD COMMAND - ${CMAKE_COMMAND} -E copy_if_different "$" ${CMAKE_CURRENT_BINARY_DIR}/${MAPNIK_CP_PLG_DESTINATION}/) - else() - message(NOTICE "${MAPNIK_CP_PLG_TARGET} requires plugin ${PLUGIN} but it isn't build. Check USE_PLUGIN_INPUT_ options to enable the plugin.") - endif() - endforeach() - endif() -endfunction() - -function(mapnik_require_fonts) - if(COPY_FONTS_AND_PLUGINS_FOR_EXECUTABLES) - set(options) - set(oneValueArgs TARGET DESTINATION) - set(multiValueArgs) - cmake_parse_arguments(MAPNIK_REQUIRE_FONTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - add_custom_command(TARGET ${MAPNIK_REQUIRE_FONTS_TARGET} POST_BUILD COMMAND - ${CMAKE_COMMAND} -E copy_directory ${mapnik_SOURCE_DIR}/fonts ${CMAKE_CURRENT_BINARY_DIR}/${MAPNIK_REQUIRE_FONTS_DESTINATION}/) - endif() -endfunction() diff --git a/cmake/MapnikInstall.cmake b/cmake/MapnikInstall.cmake index 4d1d0bb4d..eb343032d 100644 --- a/cmake/MapnikInstall.cmake +++ b/cmake/MapnikInstall.cmake @@ -59,8 +59,6 @@ function(mapnik_install_utility _target) set_property(GLOBAL APPEND PROPERTY MAPNIK_UTILITIES ${_target}) endfunction() - - function(mapnik_install_targets) if(INSTALL_DEPENDENCIES AND WIN32) # https://cmake.org/cmake/help/latest/policy/CMP0087.html @@ -93,5 +91,4 @@ function(mapnik_install_targets) fixup_bundle(\"${_internal_executables}\" \"${_internal_libraries}\" \"${ADDITIONAL_LIBARIES_PATHS}\") " COMPONENT MapnikRuntime) endif() - endfunction() diff --git a/cmake/mapnikConfig.cmake.in b/cmake/mapnikConfig.cmake.in index 942321e17..e0aee8778 100644 --- a/cmake/mapnikConfig.cmake.in +++ b/cmake/mapnikConfig.cmake.in @@ -6,6 +6,8 @@ set_and_check(MAPNIK_FONTS_DIR "@PACKAGE_FONTS_INSTALL_DIR@" CACHE STRING "") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/Modules/") include(CMakeFindDependencyMacro) + +find_dependency(Threads REQUIRED) @MAPNIK_DEPENDENCIES@ include("${CMAKE_CURRENT_LIST_DIR}/mapnikTargets.cmake") diff --git a/demo/c++/CMakeLists.txt b/demo/c++/CMakeLists.txt index ffa2cb1a8..ee9e79af5 100644 --- a/demo/c++/CMakeLists.txt +++ b/demo/c++/CMakeLists.txt @@ -1,9 +1,8 @@ -project(mapnik-demo) - add_executable(mapnik-demo rundemo.cpp) +set_target_properties(mapnik-demo PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" +) target_link_libraries(mapnik-demo PRIVATE mapnik::agg mapnik::mapnik) - -mapnik_copy_plugins(TARGET mapnik-demo DESTINATION plugins/input PLUGINS input-shape) -mapnik_require_fonts(TARGET mapnik-demo DESTINATION fonts) -mapnik_copy_dependencies(TARGETS mapnik-demo PLUGINS input-shape) diff --git a/demo/viewer/CMakeLists.txt b/demo/viewer/CMakeLists.txt index 445d5fa78..cbe348291 100644 --- a/demo/viewer/CMakeLists.txt +++ b/demo/viewer/CMakeLists.txt @@ -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) @@ -42,6 +40,9 @@ set_target_properties(mapnik-viewer PROPERTIES AUTORCC ON AUTOUIC ON AUTOMOC ON + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) target_link_libraries(mapnik-viewer PRIVATE @@ -62,17 +63,3 @@ endif() install(FILES ${CMAKE_CURRENT_BINARY_DIR}/viewer.ini DESTINATION bin) mapnik_install_utility(mapnik-viewer) - -mapnik_copy_dependencies( - TARGETS - mapnik-viewer - PLUGINS - input-csv input-gdal input-geobuf input-geojson input-ogr input-pgraster input-postgis input-raster input-shape input-sqlite input-topojson -) - -mapnik_copy_plugins(TARGET mapnik-viewer - DESTINATION - ${PLUGINS_INSTALL_DIR} - PLUGINS - input-csv input-gdal input-geobuf input-geojson input-ogr input-pgraster input-postgis input-raster input-shape input-sqlite input-topojson -) diff --git a/docs/cmake-usage.md b/docs/cmake-usage.md index 2c646b2d3..20f9144be 100644 --- a/docs/cmake-usage.md +++ b/docs/cmake-usage.md @@ -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": "/scripts/buildsystems/vcpkg.cmake", - "ADDITIONAL_LIBARIES_PATHS":"/installed/x64-windows/debug/bin" + "CMAKE_TOOLCHAIN_FILE": "/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": "/scripts/buildsystems/vcpkg.cmake", - "ADDITIONAL_LIBARIES_PATHS":"/installed/x64-windows/bin" - } + "inherits": ["vcpkg", "windows-default-release"] } ] } diff --git a/plugins/input/CMakeLists.txt b/plugins/input/CMakeLists.txt index 598f77f91..5f89249ec 100644 --- a/plugins/input/CMakeLists.txt +++ b/plugins/input/CMakeLists.txt @@ -1,36 +1,74 @@ set(_plugin_prefix "") set(_plugin_suffix ".input") +# add a list with all build plugins so the copy dependencies command can wait for all build events +set(m_build_plugins "") if(USE_PLUGIN_INPUT_CSV) add_subdirectory(csv) + list(APPEND m_build_plugins input-csv) endif() if(USE_PLUGIN_INPUT_GDAL) add_subdirectory(gdal) + list(APPEND m_build_plugins input-gdal) endif() if(USE_PLUGIN_INPUT_GEOBUF) add_subdirectory(geobuf) + list(APPEND m_build_plugins input-geobuf) endif() if(USE_PLUGIN_INPUT_GEOJSON) add_subdirectory(geojson) + list(APPEND m_build_plugins input-geojson) endif() if(USE_PLUGIN_INPUT_OGR) add_subdirectory(ogr) + list(APPEND m_build_plugins input-ogr) endif() if(USE_PLUGIN_INPUT_PGRASTER) add_subdirectory(pgraster) + list(APPEND m_build_plugins input-pgraster) endif() if(USE_PLUGIN_INPUT_POSTGIS) add_subdirectory(postgis) + list(APPEND m_build_plugins input-postgis) endif() if(USE_PLUGIN_INPUT_RASTER) add_subdirectory(raster) + list(APPEND m_build_plugins input-raster) endif() if(USE_PLUGIN_INPUT_SHAPE) add_subdirectory(shape) + list(APPEND m_build_plugins input-shape) endif() if(USE_PLUGIN_INPUT_SQLITE) add_subdirectory(sqlite) + list(APPEND m_build_plugins input-sqlite) endif() if(USE_PLUGIN_INPUT_TOPOJSON) add_subdirectory(topojson) + list(APPEND m_build_plugins input-topojson) +endif() + +# +# Copy all plugin dlls, so that these are in the main output dir, since cmake copies those into ${MAPNIK_OUTPUT_DIR}/plugins/input, too. +# +if(WIN32) + list(LENGTH m_build_plugins m_number_plugins) + if(m_number_plugins GREATER 0) + string(CONFIGURE + [[ + file(GLOB m_deps "./*.dll") + message(STATUS "plugin deps: ${m_deps}") + file(COPY ${m_deps} DESTINATION "@MAPNIK_OUTPUT_DIR@") + ]] m_copy_dlls_str @ONLY + ) + file (GENERATE OUTPUT "copy_dlls_$.cmake" + CONTENT "${m_copy_dlls_str}" + ) + add_custom_target(copy_plugin_dependencies ALL + COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/copy_dlls_$.cmake" + WORKING_DIRECTORY "${MAPNIK_OUTPUT_DIR}/plugins/input" + COMMENT "copying plugin dlls into build dir" + ) + add_dependencies(copy_plugin_dependencies ${m_build_plugins}) + endif() endif() diff --git a/plugins/input/csv/CMakeLists.txt b/plugins/input/csv/CMakeLists.txt index 636f5f147..dcc966157 100644 --- a/plugins/input/csv/CMakeLists.txt +++ b/plugins/input/csv/CMakeLists.txt @@ -1,5 +1,3 @@ -project(input-csv) - add_library(input-csv MODULE csv_datasource.cpp csv_featureset.cpp @@ -16,6 +14,8 @@ set_target_properties(input-csv PROPERTIES OUTPUT_NAME "csv" PREFIX "${_plugin_prefix}" SUFFIX "${_plugin_suffix}" + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/plugins/input" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) - mapnik_install_plugin(input-csv) diff --git a/plugins/input/gdal/CMakeLists.txt b/plugins/input/gdal/CMakeLists.txt index 6ae6336a4..746953a3c 100644 --- a/plugins/input/gdal/CMakeLists.txt +++ b/plugins/input/gdal/CMakeLists.txt @@ -1,5 +1,3 @@ -project(input-gdal) - find_package(GDAL REQUIRED) add_library(input-gdal MODULE @@ -15,6 +13,8 @@ set_target_properties(input-gdal PROPERTIES OUTPUT_NAME "gdal" PREFIX "${_plugin_prefix}" SUFFIX "${_plugin_suffix}" + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/plugins/input" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) - mapnik_install_plugin(input-gdal) diff --git a/plugins/input/geobuf/CMakeLists.txt b/plugins/input/geobuf/CMakeLists.txt index 6406d528f..870b603d9 100644 --- a/plugins/input/geobuf/CMakeLists.txt +++ b/plugins/input/geobuf/CMakeLists.txt @@ -1,5 +1,3 @@ -project(input-geobuf) - add_library(input-geobuf MODULE geobuf_datasource.cpp geobuf_featureset.cpp @@ -9,6 +7,8 @@ set_target_properties(input-geobuf PROPERTIES OUTPUT_NAME "geobuf" PREFIX "${_plugin_prefix}" SUFFIX "${_plugin_suffix}" + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/plugins/input" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) - mapnik_install_plugin(input-geobuf) diff --git a/plugins/input/geojson/CMakeLists.txt b/plugins/input/geojson/CMakeLists.txt index e04b7a768..e32dcfcb1 100644 --- a/plugins/input/geojson/CMakeLists.txt +++ b/plugins/input/geojson/CMakeLists.txt @@ -1,5 +1,3 @@ -project(input-geojson) - add_library(input-geojson MODULE geojson_datasource.cpp geojson_featureset.cpp @@ -14,6 +12,8 @@ set_target_properties(input-geojson PROPERTIES OUTPUT_NAME "geojson" PREFIX "${_plugin_prefix}" SUFFIX "${_plugin_suffix}" + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/plugins/input" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) - mapnik_install_plugin(input-geojson) diff --git a/plugins/input/ogr/CMakeLists.txt b/plugins/input/ogr/CMakeLists.txt index b149bd893..f460eb033 100644 --- a/plugins/input/ogr/CMakeLists.txt +++ b/plugins/input/ogr/CMakeLists.txt @@ -1,5 +1,3 @@ -project(input-ogr) - find_package(GDAL REQUIRED) add_library(input-ogr MODULE @@ -17,6 +15,8 @@ set_target_properties(input-ogr PROPERTIES OUTPUT_NAME "ogr" PREFIX "${_plugin_prefix}" SUFFIX "${_plugin_suffix}" + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/plugins/input" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) - mapnik_install_plugin(input-ogr) diff --git a/plugins/input/pgraster/CMakeLists.txt b/plugins/input/pgraster/CMakeLists.txt index 7e6cb4dc7..f7ac4ff66 100644 --- a/plugins/input/pgraster/CMakeLists.txt +++ b/plugins/input/pgraster/CMakeLists.txt @@ -1,5 +1,3 @@ -project(input-pgraster) - find_package(PostgreSQL REQUIRED) add_library(input-pgraster MODULE @@ -15,5 +13,8 @@ set_target_properties(input-pgraster PROPERTIES OUTPUT_NAME "pgraster" PREFIX "${_plugin_prefix}" SUFFIX "${_plugin_suffix}" + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/plugins/input" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) mapnik_install_plugin(input-pgraster) diff --git a/plugins/input/postgis/CMakeLists.txt b/plugins/input/postgis/CMakeLists.txt index 667cfbd67..796e0c90e 100644 --- a/plugins/input/postgis/CMakeLists.txt +++ b/plugins/input/postgis/CMakeLists.txt @@ -1,5 +1,3 @@ -project(input-postgis) - find_package(PostgreSQL REQUIRED) add_library(input-postgis MODULE @@ -14,6 +12,8 @@ set_target_properties(input-postgis PROPERTIES OUTPUT_NAME "postgis" PREFIX "${_plugin_prefix}" SUFFIX "${_plugin_suffix}" + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/plugins/input" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) - mapnik_install_plugin(input-postgis) diff --git a/plugins/input/raster/CMakeLists.txt b/plugins/input/raster/CMakeLists.txt index 9b44540d3..c7426ea3a 100644 --- a/plugins/input/raster/CMakeLists.txt +++ b/plugins/input/raster/CMakeLists.txt @@ -1,5 +1,3 @@ -project(input-raster) - add_library(input-raster MODULE raster_datasource.cpp raster_featureset.cpp @@ -10,6 +8,8 @@ set_target_properties(input-raster PROPERTIES OUTPUT_NAME "raster" PREFIX "${_plugin_prefix}" SUFFIX "${_plugin_suffix}" + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/plugins/input" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) - mapnik_install_plugin(input-raster) diff --git a/plugins/input/shape/CMakeLists.txt b/plugins/input/shape/CMakeLists.txt index 1db71db7b..6d9a9a7d1 100644 --- a/plugins/input/shape/CMakeLists.txt +++ b/plugins/input/shape/CMakeLists.txt @@ -1,5 +1,3 @@ -project(input-shape) - add_library(input-shape MODULE dbfile.cpp dbf_test.cpp @@ -13,6 +11,8 @@ set_target_properties(input-shape PROPERTIES OUTPUT_NAME "shape" PREFIX "${_plugin_prefix}" SUFFIX "${_plugin_suffix}" + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/plugins/input" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) - mapnik_install_plugin(input-shape) diff --git a/plugins/input/sqlite/CMakeLists.txt b/plugins/input/sqlite/CMakeLists.txt index dedf98c3a..984bdfd1b 100644 --- a/plugins/input/sqlite/CMakeLists.txt +++ b/plugins/input/sqlite/CMakeLists.txt @@ -1,5 +1,3 @@ -project(input-sqlite) - find_package(SQLite3 REQUIRED) add_library(input-sqlite MODULE @@ -15,6 +13,8 @@ set_target_properties(input-sqlite PROPERTIES OUTPUT_NAME "sqlite" PREFIX "${_plugin_prefix}" SUFFIX "${_plugin_suffix}" + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/plugins/input" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) - mapnik_install_plugin(input-sqlite) diff --git a/plugins/input/topojson/CMakeLists.txt b/plugins/input/topojson/CMakeLists.txt index bd6f2cc67..fd2b4994b 100644 --- a/plugins/input/topojson/CMakeLists.txt +++ b/plugins/input/topojson/CMakeLists.txt @@ -1,5 +1,3 @@ -project(input-topojson) - add_library(input-topojson MODULE topojson_datasource.cpp topojson_featureset.cpp @@ -13,6 +11,8 @@ set_target_properties(input-topojson PROPERTIES OUTPUT_NAME "topojson" PREFIX "${_plugin_prefix}" SUFFIX "${_plugin_suffix}" + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/plugins/input" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) - mapnik_install_plugin(input-topojson) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 343a6d540..831563072 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,6 +19,9 @@ set_target_properties(mapnik PROPERTIES VERSION ${MAPNIK_VERSION} # see https://github.com/mapnik/mapnik/pull/4248#issuecomment-925596509 => ABI compability only with the full version SOVERSION ${MAPNIK_VERSION} + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) if(MSVC) diff --git a/src/json/CMakeLists.txt b/src/json/CMakeLists.txt index e427561d9..b35e0183a 100644 --- a/src/json/CMakeLists.txt +++ b/src/json/CMakeLists.txt @@ -33,6 +33,9 @@ set_target_properties(json PROPERTIES VERSION ${MAPNIK_VERSION} # see mapnik target for explanation SOVERSION ${MAPNIK_VERSION} + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) mapnik_install(json) diff --git a/src/wkt/CMakeLists.txt b/src/wkt/CMakeLists.txt index ff22be452..8e42bef69 100644 --- a/src/wkt/CMakeLists.txt +++ b/src/wkt/CMakeLists.txt @@ -25,6 +25,9 @@ set_target_properties(wkt PROPERTIES VERSION ${MAPNIK_VERSION} # see mapnik target for explanation SOVERSION ${MAPNIK_VERSION} + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" ) mapnik_install(wkt) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0705ddce1..847511f49 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,5 +1,3 @@ -project(mapnik-test) - find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options) find_package(PostgreSQL REQUIRED) @@ -100,6 +98,11 @@ add_executable(mapnik-test-unit unit/vertex_adapter/transform_path_adapter.cpp unit/vertex_adapter/vertex_adapter.cpp ) +set_target_properties(mapnik-test-unit PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" +) target_link_libraries(mapnik-test-unit PUBLIC Catch2::Catch2 mapnik::agg @@ -114,6 +117,11 @@ file(COPY cleanup.hpp DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") target_include_directories(mapnik-test-unit PRIVATE "${catch2_SOURCE_DIR}/single_include/catch2" ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) add_executable(agg_rasterizer_integer_overflow_test standalone/agg_rasterizer_integer_overflow_test.cpp) +set_target_properties(agg_rasterizer_integer_overflow_test PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" +) target_link_libraries(agg_rasterizer_integer_overflow_test PUBLIC Catch2::Catch2 mapnik::mapnik @@ -123,6 +131,11 @@ target_link_libraries(agg_rasterizer_integer_overflow_test PUBLIC target_include_directories(agg_rasterizer_integer_overflow_test PRIVATE "${catch2_SOURCE_DIR}/single_include/catch2" ${CMAKE_CURRENT_BINARY_DIR}) add_executable(datasource_registration_test standalone/datasource_registration_test.cpp) +set_target_properties(datasource_registration_test PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" +) target_link_libraries(datasource_registration_test PUBLIC Catch2::Catch2 mapnik::mapnik @@ -131,6 +144,11 @@ target_link_libraries(datasource_registration_test PUBLIC target_include_directories(datasource_registration_test PRIVATE "${catch2_SOURCE_DIR}/single_include/catch2" ${CMAKE_CURRENT_BINARY_DIR}) add_executable(font_registration_test standalone/font_registration_test.cpp) +set_target_properties(font_registration_test PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" +) target_link_libraries(font_registration_test PUBLIC Catch2::Catch2 mapnik::mapnik @@ -141,6 +159,11 @@ target_include_directories(font_registration_test PRIVATE "${catch2_SOURCE_DIR}/ #not workable since boost::filesystem native returns a wstring and the function taskes a std::string add_executable(map_xml_test standalone/map_xml_test.cpp) +set_target_properties(map_xml_test PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" +) target_link_libraries(map_xml_test PUBLIC Catch2::Catch2 mapnik::mapnik @@ -155,6 +178,11 @@ add_executable(mapnik-test-visual visual/runner.cpp visual/run.cpp ) +set_target_properties(mapnik-test-visual PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib" +) target_link_libraries(mapnik-test-visual PRIVATE Catch2::Catch2 Boost::program_options @@ -164,44 +192,28 @@ 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") -# use only mapnik-test-unit since it has the same build path -mapnik_copy_plugins( - TARGET mapnik-test-unit - DESTINATION plugins/input - PLUGINS - input-csv input-gdal input-geobuf input-geojson input-ogr input-pgraster input-postgis input-raster input-shape input-sqlite input-topojson -) -mapnik_require_fonts(TARGET mapnik-test-unit DESTINATION fonts) - -mapnik_copy_dependencies( - TARGETS - mapnik-test-unit agg_rasterizer_integer_overflow_test datasource_registration_test font_registration_test map_xml_test mapnik-test-visual - PLUGINS - input-csv input-gdal input-geobuf input-geojson input-ogr input-pgraster input-postgis input-raster input-shape input-sqlite input-topojson -) - - -file(COPY data DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/test") -file(COPY data-visual DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/test") -file(COPY unit/data DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/test/unit") -file(COPY "${mapnik_SOURCE_DIR}/demo/data" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/demo") +file(COPY data DESTINATION "${MAPNIK_OUTPUT_DIR}/test") +file(COPY data-visual DESTINATION "${MAPNIK_OUTPUT_DIR}/test") +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) + if(WIN32) - catch_discover_tests(mapnik-test-unit PROPERTIES - ENVIRONMENT "PATH=\$;$;$ENV{PATH}>,\\\\\\\\\;>" - ) + set(m_test_path "\$;$;$ENV{PATH}>,\\\\\\\\\;>") else() - catch_discover_tests(mapnik-test-unit PROPERTIES - ENVIRONMENT "PATH=$;$;$ENV{PATH}>" - ) + set(m_test_path "$;$;$ENV{PATH}>") endif() - -catch_discover_tests(agg_rasterizer_integer_overflow_test) -catch_discover_tests(datasource_registration_test) -catch_discover_tests(font_registration_test) -catch_discover_tests(map_xml_test) +catch_discover_tests(mapnik-test-unit + WORKING_DIRECTORY "${MAPNIK_OUTPUT_DIR}" + PROPERTIES + ENVIRONMENT + "PATH=${m_test_path}" +) +catch_discover_tests(agg_rasterizer_integer_overflow_test WORKING_DIRECTORY "${MAPNIK_OUTPUT_DIR}") +catch_discover_tests(datasource_registration_test WORKING_DIRECTORY "${MAPNIK_OUTPUT_DIR}") +catch_discover_tests(font_registration_test WORKING_DIRECTORY "${MAPNIK_OUTPUT_DIR}") +catch_discover_tests(map_xml_test WORKING_DIRECTORY "${MAPNIK_OUTPUT_DIR}") diff --git a/utils/geometry_to_wkb/CMakeLists.txt b/utils/geometry_to_wkb/CMakeLists.txt index 7266f72c6..518f4ac9a 100644 --- a/utils/geometry_to_wkb/CMakeLists.txt +++ b/utils/geometry_to_wkb/CMakeLists.txt @@ -1,7 +1,9 @@ -project(geometry_to_wkb) - add_executable(geometry_to_wkb main.cpp) target_link_libraries(geometry_to_wkb PRIVATE mapnik::mapnik) +set_target_properties(geometry_to_wkb PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" +) + mapnik_install_utility(geometry_to_wkb) diff --git a/utils/mapnik-index/CMakeLists.txt b/utils/mapnik-index/CMakeLists.txt index 22925e1b5..ec6ce97eb 100644 --- a/utils/mapnik-index/CMakeLists.txt +++ b/utils/mapnik-index/CMakeLists.txt @@ -1,5 +1,3 @@ -project(mapnik-index) - find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options) add_executable(mapnik-index @@ -15,4 +13,8 @@ target_link_libraries(mapnik-index PRIVATE Boost::program_options ) +set_target_properties(mapnik-index PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" +) + mapnik_install_utility(mapnik-index) diff --git a/utils/mapnik-render/CMakeLists.txt b/utils/mapnik-render/CMakeLists.txt index b5e8fa1a5..27ccfbe8d 100644 --- a/utils/mapnik-render/CMakeLists.txt +++ b/utils/mapnik-render/CMakeLists.txt @@ -1,5 +1,3 @@ -project(mapnik-render) - find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options) add_executable(mapnik-render mapnik-render.cpp) @@ -9,4 +7,8 @@ target_link_libraries(mapnik-render PRIVATE Boost::program_options ) +set_target_properties(mapnik-render PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" +) + mapnik_install_utility(mapnik-render) diff --git a/utils/ogrindex/CMakeLists.txt b/utils/ogrindex/CMakeLists.txt index 20ee5cf4e..69f27cdd6 100644 --- a/utils/ogrindex/CMakeLists.txt +++ b/utils/ogrindex/CMakeLists.txt @@ -1,7 +1,9 @@ -project(ogrindex) - add_executable(ogrindex ogrindex.cpp) target_link_libraries(ogrindex PRIVATE mapnik::mapnik) +set_target_properties(ogrindex PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" +) + mapnik_install_utility(ogrindex) diff --git a/utils/pgsql2sqlite/CMakeLists.txt b/utils/pgsql2sqlite/CMakeLists.txt index 7d7679987..6def100c0 100644 --- a/utils/pgsql2sqlite/CMakeLists.txt +++ b/utils/pgsql2sqlite/CMakeLists.txt @@ -1,4 +1,3 @@ -project(pgsql2sqlite) find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options) find_package(SQLite3 REQUIRED) find_package(PostgreSQL REQUIRED) @@ -16,4 +15,8 @@ target_link_libraries(pgsql2sqlite PRIVATE mapnik::mapnik ) +set_target_properties(pgsql2sqlite PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" +) + mapnik_install_utility(pgsql2sqlite) diff --git a/utils/shapeindex/CMakeLists.txt b/utils/shapeindex/CMakeLists.txt index 3a8febb16..d39ca3f04 100644 --- a/utils/shapeindex/CMakeLists.txt +++ b/utils/shapeindex/CMakeLists.txt @@ -1,5 +1,3 @@ -project(shapeindex) - find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options) add_executable(shapeindex @@ -12,4 +10,8 @@ target_link_libraries(shapeindex PRIVATE mapnik::mapnik ) +set_target_properties(shapeindex PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" +) + mapnik_install_utility(shapeindex) diff --git a/utils/svg2png/CMakeLists.txt b/utils/svg2png/CMakeLists.txt index ba2e9c89b..dc239cd2b 100644 --- a/utils/svg2png/CMakeLists.txt +++ b/utils/svg2png/CMakeLists.txt @@ -1,5 +1,3 @@ -project(svg2png) - find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options) add_executable(svg2png @@ -12,4 +10,8 @@ target_link_libraries(svg2png PRIVATE mapnik::agg ) +set_target_properties(svg2png PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}" +) + mapnik_install_utility(svg2png)