Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.0.0-rc1 pollutes /usr/include toplevel directory #4439

Closed
sebastic opened this issue Apr 16, 2024 · 1 comment · Fixed by #4441
Closed

4.0.0-rc1 pollutes /usr/include toplevel directory #4439

sebastic opened this issue Apr 16, 2024 · 1 comment · Fixed by #4441
Assignees

Comments

@sebastic
Copy link
Contributor

The CMake build for 4.0.0-rc1 installs the AGG headers and build.py in /usr/include instead of /usr/include/mapnik.

Mapnik 3.1.0 installed the AGG headers under /usr/include/mapnik/agg which is much more appropriate.

The following changes revert the header installation paths back to what 3.1 did:

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -448,8 +448,8 @@ feature_summary(FILENAME "${CMAKE_CURREN
 include(MapnikExport)
 include(MapnikExportPkgConfig)
 
-install(DIRECTORY include/ DESTINATION "${MAPNIK_INCLUDE_DIR}")
-install(DIRECTORY deps/agg/include/ DESTINATION "${MAPNIK_INCLUDE_DIR}")
+install(DIRECTORY include/mapnik/ DESTINATION "${MAPNIK_INCLUDE_DIR}/mapnik")
+install(DIRECTORY deps/agg/include/ DESTINATION "${MAPNIK_INCLUDE_DIR}/mapnik/agg")
 install(DIRECTORY deps/mapnik DESTINATION "${MAPNIK_INCLUDE_DIR}")
 file(GLOB TTF_FONT_FILES "fonts/*/*/*.ttf")
 install(FILES ${TTF_FONT_FILES} DESTINATION "${FONTS_INSTALL_DIR}")
--- a/cmake/MapnikExportPkgConfig.cmake
+++ b/cmake/MapnikExportPkgConfig.cmake
@@ -9,7 +9,7 @@ Name: @_lib_name@
 Description: @_description@
 Version: @MAPNIK_VERSION@
 Libs: -L"${libdir}" -l$<TARGET_FILE_BASE_NAME:@_target@>$<TARGET_PROPERTY:@_target@,$<CONFIG>_POSTFIX>
-Cflags: -I"${includedir}" ]]
+Cflags: -I"${includedir}" -I"${includedir}/mapnik" -I"${includedir}/mapnik/agg" ]]
     _contents @ONLY)
 
     file(GENERATE
@@ -73,7 +73,7 @@ Description: @_description@
 Version: @MAPNIK_VERSION@
 Requires: @m_requires@
 Libs: -L"${libdir}" -l$<TARGET_FILE_BASE_NAME:mapnik>$<TARGET_PROPERTY:mapnik,$<CONFIG>_POSTFIX>
-Cflags: -I"${includedir}" @m_str_compile_defs@]]
+Cflags: -I"${includedir}" -I"${includedir}/mapnik" -I"${includedir}/mapnik/agg" @m_str_compile_defs@]]
     _contents @ONLY)
     file(GENERATE
         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_lib_name}-$<CONFIG>.pc
@mathisloge mathisloge self-assigned this Apr 16, 2024
@artemp
Copy link
Member

artemp commented Apr 16, 2024

@sebastic good call, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants