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

fpng: add recipe #22823

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

fpng: add recipe #22823

wants to merge 6 commits into from

Conversation

toge
Copy link
Contributor

@toge toge commented Feb 19, 2024

Specify library name and version: fpng/*


@conan-center-bot

This comment has been minimized.

@AbrilRBS AbrilRBS self-assigned this Feb 20, 2024
#include "fpng.h"

int main() {
fpng::fpng_init();
Copy link
Contributor

Choose a reason for hiding this comment

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

Inconsistent indentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@valgur
Thanks a lot!
Fixed.

recipes/fpng/all/CMakeLists.txt Outdated Show resolved Hide resolved
recipes/fpng/all/conanfile.py Outdated Show resolved Hide resolved
toge and others added 3 commits March 20, 2024 20:59
Co-authored-by: Martin Valgur <martin.valgur@gmail.com>
Co-authored-by: Martin Valgur <martin.valgur@gmail.com>
@conan-center-bot

This comment has been minimized.


def generate(self):
tc = CMakeToolchain(self)
tc.variables["FPNG_SRC_DIR"] = self.source_folder.replace("\\", "/")
Copy link
Contributor

Choose a reason for hiding this comment

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

Not worth changing it here, but I generally find it easier to

def export_sources(self):
    copy(self, "CMakeLists.txt", self.recipe_folder, os.path.join(self.export_sources_folder, "src"))

That way all of the CMakeLists.txt and source paths work without any prefixing.

The current approach is not wrong either, though, of course.

add_library(fpng ${FPNG_SRC_DIR}/src/fpng.cpp)
set_target_properties(fpng PROPERTIES
PUBLIC_HEADER ${FPNG_SRC_DIR}/src/fpng.h
WINDOWS_EXPORT_ALL_SYMBOLS ON
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see the project build files doing the equivalent, so the recipe should probably simply disable the Windows shared configuration instead.

Copy link
Member

Choose a reason for hiding this comment

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

+1 @toge

Co-authored-by: Martin Valgur <martin.valgur@gmail.com>
@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 4 (848de399f8c095159a1cb48fae9fc4e49ed22c07):

  • fpng/1.0.6:
    All packages built successfully! (All logs)

Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 4 (848de399f8c095159a1cb48fae9fc4e49ed22c07):

  • fpng/1.0.6:
    All packages built successfully! (All logs)

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.

4 participants