I use xmake project -k cmakelists command to generate cmake file for IDE, but if i use conditional add_files in xmake file then the generated cmake file doesn't have conditionally added files. Actual compilation is working as intended.
Expected Behavior
Cmake file should contain conditionally added sources.
Project Configuration
add_rules("mode.debug", "mode.release")
set_languages("c99")
option("GUI")
set_default(false)
set_showmenu(true)
set_category("Application type")
add_defines("GUI")
option("Console")
set_default(true)
set_showmenu(true)
set_category("Application type")
add_defines("CONSOLE")
target("elib")
set_kind("static")
set_options("GUI", "Console")
if is_config("GUI") then
add_files("src/windows/*.c")
elseif is_config("Console") then
add_files("src/console/*.c")
end
add_files("src/*.c")
Xmake Version
2.9.4
Operating System Version and Architecture
Windows 10 22H2
Describe Bug
I use
xmake project -k cmakelists
command to generate cmake file for IDE, but if i use conditional add_files in xmake file then the generated cmake file doesn't have conditionally added files. Actual compilation is working as intended.Expected Behavior
Cmake file should contain conditionally added sources.
Project Configuration
Additional Information and Error Logs
Generated cmake file: