Hi,
I tried to set up the projectdefinition.txt for a bigger plugin project we have here. I guess I'm doing it wrong... or the project tool does not behave the way I would expect from reading the SDK.
This is the folder structure of the project (I know it's not ideal, but reorganising all the files and subfolders is currently not an option):
my_big_project
+ project
+ projectdefinition.txt
+ source
+ main.cpp
+ many_more_files.cpp
+ lots_of_headers.h
+ some_extra_folder_with_source
+ irrelevant_subfolder
+ files_that_must_not_be_included!
+ sourcefile.cpp
+ headerfile.h
+ git_submodule_of_a_library
+ project_mac.xcodeproj
+ project_windows.vcxproj
+ project_windows.sln
+ files_that_must_not_be_included!
+ include
+ header_files_that_must_be_included!
+ another_subfolder
+ files_that_must_not_be_included
+ include
+ headerfiles_that_must_be_included
I need to:
- Give the generated project a different name than "my_big_project"
- Exclude the folders "some_extra_folder_with_source/irrelevant_subfolder" and "git_submodule_of_a_library", so the source files in those folders won't be in my project
- Include the project files from "git_submodule_of_a_library" to be referenced in my project. Their resulting library files must also be linked in my plugin binary!
- Add include paths to "some_extra_folder_with_source, "git_submodule_of_a_library/include", and "git_submodule_of_a_library/another_subfolder/include".
This is what my projectdefinition.txt looks like:
// Supported platforms - can be [Win64;OSX]
Platform=Win64;OSX
// Type of project - can be [Lib;DLL;App]
Type=DLL
// C4D component
C4D=true
// API dependencies
APIS=cinema.framework;mesh_misc.framework;math.framework;core.framework;
AdditionalDependencies=../git_submodule_of_a_library/project_windows.vcxproj;
Frameworks.OSX=../git_submodule_of_a_library/project_mac.xcodeproj;
// Search paths
USER_HEADER_SEARCH_PATHS=../git_submodule_of_a_library/include;../git_submodule_of_a_library/another_subfolder/include;../some_extra_folder_with_source;
AdditionalIncludeDirectories=../git_submodule_of_a_library/include;../git_submodule_of_a_library/another_subfolder/include;../some_extra_folder_with_source;%(AdditionalIncludeDirectories)
// Exclude unwanted source files from being added to project
Exclude=../some_extra_folder_with_source/irrelevant_subfolder/; \
../git_submodule_of_a_library/;
// plugin/module ID
ModuleId=com.myself.myplugin
I opened the generated project in Xcode 10 (didn't check Visual Studio yet), and found:
- All source files from the excluded folder have been added to the project. None of the defined Excludes has worked.
- an empty folder "frameworks" exists in the project structure in XCode. Why?
- A second folder "Frameworks" also exists in the project structure in XCode. It contains the referenced Maxon frameworks, and a dead reference to
../git_submodule_of_a_library/project_mac.xcodeproj
(meaning: The project file appears, but it's greyed out and does not contain anything) - There is only one single include path set in the project:
../git_submodule_of_a_library/another_subfolder/include
. Where are the other ones? - I also don't know how to name the generated project file.
Any idea how to make this work?
Thanks in advance!
Cheers,
Frank