

Use INCLUDEDIRECTORIES to pass additional include directories. Note The GENERATED source file property may be globally visible.

) Sets properties associated with source files using a key/value paired list.
PROPERTIESNew in version 3.18: By default, source file properties are only visible to targets added in the same directory ( CMakeLists.txt ). One property that is always there is LOCATION. Source files can have properties that affect how they are built. Sets properties associated with source files using a key/value paired list. Source file properties usually control how the file is built.

Use COMPILEDEFINITIONS to pass additional preprocessor definitions. Use setsourcefilesproperties () to set property values. Target_link_libraries(gd_platform PRIVATE gd_icon_windows) setsourcefilesproperties (foo.cpp PROPERTIES COMPILEOPTIONS '-Wno-unused-parameter -Wno-missing-field-initializer') Related properties: Prefer this property over COMPILEFLAGS. cmake - cmakesetsourcefilesproperties cmake CMakeLists.txt setsourcefilesproperties : setsourcefilesproperties (a.cpp PROPERTIES COMPILEDEFINITIONS DIR1 '/home/xxx/b. Here is a directory structure: make_gen.pyĬMakeLists.txt: # add_library(platform STATIC) Hi, I believe I have run into a bug regarding generated files via add_custom_command and target_sources when subdirectories are involved.īear with me please, as this is a bit weird. 1 Im working on a C++ project that uses wxWidgets with a CMake script I wrote to resolve this dependency when I build it.
