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

Add cmake support to LodePNG #1

Merged
merged 2 commits into from
Nov 29, 2018
Merged

Add cmake support to LodePNG #1

merged 2 commits into from
Nov 29, 2018

Conversation

bkotzz
Copy link

@bkotzz bkotzz commented Nov 27, 2018

This change adds support to build this library with cmake. Normally, we would contribute this upstream, but there are 3 PRs up to do that, and have not been answered:

It's unclear if the author is receptive to adding CMake support or not.

This change will then allow the package to be used with Hunter.

Tested by pulling in and building/linking against lodepng in both debug and release projects.

After merge, can we make a release version, and then I will pull it in to hunter/hunter?

@bkotzz bkotzz requested a review from ruslo November 27, 2018 19:35
@@ -0,0 +1,69 @@
cmake_minimum_required(VERSION 3.0)

# Project is not versioned, so use date of last upstream commit.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually I do 0.0.0 in this case because if they will release for example 1.0.0 then we will have situation when 2018.10.29 is greater than 1.0.0 (see https://semver.org/).

Also VERSION is not a requirement neither for CMake install config nor Hunter, so you are free to remove related parts.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks. I'll do 0.0.0 then

CMakeLists.txt Outdated
set(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}Config.cmake")

set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
set(INCLUDE_INSTALL_DIR "include")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ruslo ruslo merged commit e6a442b into hunter Nov 29, 2018
@ruslo
Copy link

ruslo commented Nov 29, 2018

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

Successfully merging this pull request may close these issues.

3 participants