I want to re-organise my directories to get all common files in a single directory.
I'm working on W11/VSCODE
At the moment I have all files for each variant of the firmware in separate directories. i.e. many of the files are duplicated. Clearly this is a bad approach.
So I want to move all common files into a separate directory soWhat do I put in the APP1 Cmake file to allow it to find source files both in its own directory and in GENERICdir
My naive attempt to use target_include_directories failed and the cmake documentation is, to me, completely incomprehensible and the error messages even more so!
I'm working on W11/VSCODE
At the moment I have all files for each variant of the firmware in separate directories. i.e. many of the files are duplicated. Clearly this is a bad approach.
So I want to move all common files into a separate directory so
Code:
APPDIR APP1dir APP1 Cmake app1 specific files APP2dir APP2 CMake app2 specific files GENERICdir generic files
My naive attempt to use target_include_directories failed and the cmake documentation is, to me, completely incomprehensible and the error messages even more so!
Specifies include directories to use when compiling a given target. The named <target> must have been created by a command such as add_executable() or add_library() and must not be an ALIAS target.
By using AFTER or BEFORE explicitly, you can select between appending and prepending, independent of the default.
The INTERFACE, PUBLIC and PRIVATE keywords are required to specify the scope of the following arguments. PRIVATE and PUBLIC items will populate the INCLUDE_DIRECTORIES property of <target>. PUBLIC and INTERFACE items will populate the INTERFACE_INCLUDE_DIRECTORIES property of <target>. The following arguments specify include directories.
Statistics: Posted by matherp — Sun Feb 04, 2024 11:16 am