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] configure resources dir using PLUG_RESOURCES_DIR variable #926

Open
wants to merge 4 commits into
base: cmake
Choose a base branch
from

Conversation

yatskevich
Copy link

2 changes in this PR:

1. Ability to configure resources dir using PLUG_RESOURCES_DIR variable

This can be handy when a project has a layout like this:

<root>
|- CMakeLists.txt
|- iPlug2
\- YourProject
   |- resources
   |- installer
   |- scripts
   |- etc...

PLUG_RESOURCES_DIR in CMakeLists.txt can be set to:

set(PROJECT_DIR "${CMAKE_SOURCE_DIR}/YourProject")
set(PLUG_RESOURCES_DIR "${PROJECT_DIR}/resources")

If a user doesn't specify PLUG_RESOURCES_DIR, it'll be initialized to ${CMAKE_SOURCE_DIR}/resources.

2. create 'plugin_build_dir' at build system generation time
It seems that this change has been lost in the process of transferring changes from #923

@olilarkin
Copy link
Member

thanks for the PR. It's good if you can make a PR for each thing in future.

I don't understand 2. On my mac I just get an empty folder "out" in the build directory

@yatskevich
Copy link
Author

Yep, sure – next time every piece of functionality will be in its own PR. I've included 'plugin_build_dir' commit just because I thought it was unintentionally skipped :)

Regarding plugin_build_dir – this directory is being used in postbuild-win.bat.in. If this directory is missing – the postbuild-win.bat will fail. It might be that creating an out dir in postbuild-win.bat is a better option, but I've decided not to change the script.

@olilarkin
Copy link
Member

olilarkin commented Jan 24, 2023

I'm not totally happy with the structure & MSVC projects that the cmake build scripts are making at the moment so I will improve this and maybe edit the script if needed

@yatskevich
Copy link
Author

Let's discuss it! I'm ready to help with improvements.

olilarkin added a commit that referenced this pull request Jan 2, 2024
olilarkin added a commit that referenced this pull request Apr 13, 2024
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.

None yet

2 participants