Skip to content

CMake: GNUInstallDirs, export target zlib::zlib, CPack configuration, install PDB file#148

Closed
rickertm wants to merge 5 commits intomadler:developfrom
roboticslibrary:develop
Closed

CMake: GNUInstallDirs, export target zlib::zlib, CPack configuration, install PDB file#148
rickertm wants to merge 5 commits intomadler:developfrom
roboticslibrary:develop

Conversation

@rickertm
Copy link
Copy Markdown

@rickertm rickertm commented Jun 3, 2016

Use GNUInstallDirs (${CMAKE_INSTALL_LIBDIR} instead of ${CMAKE_INSTALL_PREFIX}/lib) for improved platform compatibility
Export target zlib::zlib with corresponding config file
Add CPack configuration for packaging
Install PDB file with debug information for Debug and RelWithDebInfo builds

@tschw
Copy link
Copy Markdown

tschw commented May 15, 2017

Very nice - modern buildfiles! Thanks a lot, @rickertm !

Are you sure about the CMake minimum version? I see target_include_directories first appeared in the documentation of version 2.8.11.

Not sure when @madler last looked at CMake, but guessing from version 2.4 that might have been a while ago. As a clue on what this is about, just in case:

# only needed once per dependent build tree:
find_package(zlib CONFIG)

# now to let my_project use zlib:
target_link_libraries(my_project PRIVATE zlib::zlib)

# that's all - no need to mess with directories, files, #defines, transitive dependencies

@rickertm
Copy link
Copy Markdown
Author

Thanks for the feedback. You're right, it should be 2.8.11, I was only checking for GNUInstallDirs. Besides target_include_directories(), the module CMakePackageConfigHelpers also needs 2.8.8.

hzhuang1 pushed a commit to Linaro/warpdrive-zlib that referenced this pull request Jul 31, 2019
Rename library when compiled without --zlib-compat
@Vollstrecker Vollstrecker mentioned this pull request Dec 11, 2024
@Neustradamus Neustradamus mentioned this pull request Jan 1, 2025
@madler
Copy link
Copy Markdown
Owner

madler commented Feb 2, 2025

See #1027 .

@madler madler closed this Feb 2, 2025
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 this pull request may close these issues.

3 participants