From 4016d034b9fa60b5b76fd9b7412f28d9d3bb8c2d Mon Sep 17 00:00:00 2001 From: Daniel Cauchi <33454325+CowKeyMan@users.noreply.github.com> Date: Sat, 10 Feb 2024 14:00:57 +0200 Subject: [PATCH] Add custom target for the file generation The reason I want to propose this is so that users who just want a compilation database (I use Windows Subsystem for Linux/WSL so its useful for me) can then set the following in their own project: option(CMAKE_EXPORT_COMPILE_COMMANDS ON) And then run: cd build cmake .. cmake --build . -t godotcpp_generated_files The above just builds the generated files, and nothing else. No compilation of anything, so its very lightweight. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7151026..ad415756 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,6 +138,7 @@ add_custom_command(OUTPUT ${GENERATED_FILES_LIST} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/binding_generator.py COMMENT "Generating bindings" ) +add_custom_target(godotcpp_generated_files DEPENDS ${GENERATED_FILES_LIST}) # Get Sources file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS src/*.c**)