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

CMake install support for VCPKG #85

Open
frang75 opened this issue Jan 8, 2024 · 6 comments
Open

CMake install support for VCPKG #85

frang75 opened this issue Jan 8, 2024 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@frang75
Copy link
Owner

frang75 commented Jan 8, 2024

Add a new option in NAppGUI CMake scripts for generate the install structure required by vcpkg.

cmake -S . -B build -DCMAKE_INSTALL_TYPE=vcpkg
cmake --build build  ....
cmake --install build ....
@frang75 frang75 self-assigned this Jan 8, 2024
@frang75 frang75 added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 8, 2024
@frang75
Copy link
Owner Author

frang75 commented Jan 8, 2024

More background in #11

@ragsaq, @SamuelMarks

@frang75 frang75 added work-in-progress We are working on this issue and removed work-in-progress We are working on this issue labels Jan 10, 2024
@ragsaq
Copy link

ragsaq commented May 12, 2024

I'm trying to install nappgui with vcpkg. I have success in windows and linux (not perfect)

Working example (no resources):

hellocpp

Broken example (with resources):

products

to do this, I created a vcpkg port for nappgui and patched some of the files so that inc -> include and the cmake targets go to the shared folder.

To fix the products project, we need to use nap_desktop_app(Products "osapp;inet" NRC_PACKED) but I can't get this to work successfully because of path errors.


Can we refactor the prj so that we can import the correct nappgui cmake functions without doing include("${NAPPGUI_ROOT_PATH}/prj/NAppProject.cmake")?

Ideally, find_package(nappgui REQUIRED) can define the path to include, so that if we change the folder structure, we always do include("${NAPPGUI_PRJ_PATH}/NAppProject.cmake") and it works.

I couldn't get nappgui::osapp and similar to work in the hello example instad of ${NAPPGUI_INCLUDES}.

@frang75
Copy link
Owner Author

frang75 commented May 13, 2024

Hi! Thanks for report! I'll resume the support for VCPKG asap.

@ragsaq
Copy link

ragsaq commented May 13, 2024

Thank you! wxwidgets also is in vcpkg and they also have a nrc binary to compile resources. maybe you can have a look at how they structure things. qt too but I've had difficulty getting that to work (qt is too complicated - too many files).

@SamuelMarks
Copy link

PS: @ragsaq there's also https://www.ryanliptak.com/blog/zig-is-a-windows-resource-compiler/ - so if we try real hard nappgui might be cross-compilable from say a Linux, *BSD, or macOS host

PPS: @frang75 Great to hear. Also did you think more RE: putting things in folders to aid both vcpkg and future FFI efforts? - #11 (comment)

@frang75
Copy link
Owner Author

frang75 commented May 13, 2024

Hi @SamuelMarks. Yes the group headers in folders was done in 1.4.0 version.
https://nappgui.com/en/guide/build.html#h3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants