From 8b59adc61a4c6175993ba46f357fb6eb997ba9c0 Mon Sep 17 00:00:00 2001 From: ZealanL Date: Mon, 27 Mar 2023 20:56:19 -0700 Subject: [PATCH] Fix and simplify CMakeLists.txt source file glob --- CMakeLists.txt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b231d56..a43b253a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,17 +3,12 @@ project("RocketSim") # Add all headers and code files -file(GLOB_RECURSE FILES_CPP "src/*.cpp") -file(GLOB_RECURSE FILES_H "src/*.h") +file(GLOB_RECURSE FILES_ROCKETSIM "src/*.cpp" "src/*.h") # Only include bullet headers when using MSVC, otherwise just code files -if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - file(GLOB FILES_BULLET "libsrc/bullet3-3.24/*.cpp" "libsrc/bullet3-3.24/*.h") -else() - file(GLOB FILES_BULLET "libsrc/bullet3-3.24/*.cpp") -endif() +file(GLOB_RECURSE FILES_BULLET "libsrc/bullet3-3.24/*.cpp" "libsrc/bullet3-3.24/*.h") -add_library(RocketSim ${FILES_CPP} ${FILES_H} ${FILES_BULLET}) +add_library(RocketSim ${FILES_ROCKETSIM} ${FILES_BULLET}) set_target_properties(RocketSim PROPERTIES LINKER_LANGUAGE CXX) set_target_properties(RocketSim PROPERTIES CXX_STANDARD 20) \ No newline at end of file