Solved Project Tool: Some projectdefinition.txt options don't seem to work


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):

+ 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]

// Type of project - can be [Lib;DLL;App]

// C4D component

// API dependencies


// Search paths

// Exclude unwanted source files from being added to project
Exclude=../some_extra_folder_with_source/irrelevant_subfolder/; \

// plugin/module ID

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!

Only asking personal code questions here.


regarding Exclude: The Exlude-statement is not using file-paths, but is defining a filter. See Includes.

The name of the generated plugin project can't be changed. The NAME-attribute only works for solutions. See Project tool: Custom plugin name and master solution

Hi Sebastian!

Thanks for your reply! Isn't that exactly what I did with the Excludes?

Example in documentation:

// exclude OS specific code

What I wrote:

// Exclude unwanted source files from being added to project
Exclude=../some_extra_folder_with_source/irrelevant_subfolder/; \

I relative path with a trailing "/" at the end. Or can I only specify multiple folders for the Includes, but not for the Excludes?

Or wait, is it the ".." at the beginning that's throwing the Project Tool off?

Only asking personal code questions here.


first, please try "Exlude.Win" and "Exlude.OSX" as shown in the example.

Second, as I said, "Exclude" does not use file-paths or even relative paths. It just defines strings, that are used to filter URLs. So if ".." is not part of the actual path, it is not a match.

Aaah, ok! That's a start, thank you!
Only asking personal code questions here.

Still, how would I include a 3rd party library in the project, like in my example "git_submodule_of_a_library/project_mac.xcodeproj". It needs to be built before the plugin, and the resulting library must be linked.
Only asking personal code questions here.

As far as I know the Project Tool only handles Cinema 4D projects/plugins. I'm not aware of any way of including projects that are not C4D plugins.

I don't want to use it to create project files for non-C4D projects. I just want to build and link a ready-to-build 3rd party library.
Only asking personal code questions here.

I think we are talking past each other.

You can of course build any project any way you like. An then make sure that your plugins link to the build result using the link options defined in projectdefinition.txt.

But I think you want to include an already existing (non-plugin) project in the solution created by the Project Tool, right? And I think that is not possible. I guess you could add the project manually to the solution created by the Project Tool.