Make list of source files a variable

Should make the CMakeLists file a bit more readable and maintainable.
This commit is contained in:
prisixia 2023-04-27 11:16:37 +02:00
parent 164f49c017
commit b139b9e37a
Signed by: prisixia
GPG Key ID: CB939A148C9B4125
1 changed files with 12 additions and 16 deletions

View File

@ -9,28 +9,24 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
set(SOURCE_LIST
"src/speciesgen.cpp"
"src/error.cpp"
"src/starbound/metadata.cpp"
"src/starbound/item.cpp"
"src/starbound/patch.cpp"
"src/starbound/frames.cpp"
"src/starpounds/weightstage.cpp"
"src/starpounds/types.cpp"
)
if (NOT MSVC AND NOT WIN32)
add_executable(speciesgen
"src/speciesgen.cpp"
"src/error.cpp"
"src/starbound/metadata.cpp"
"src/starbound/item.cpp"
"src/starbound/patch.cpp"
"src/starbound/frames.cpp"
"src/starpounds/weightstage.cpp"
"src/starpounds/types.cpp"
${SOURCE_LIST}
)
else()
add_executable(speciesgen WIN32
"src/speciesgen.cpp"
"src/error.cpp"
"src/starbound/metadata.cpp"
"src/starbound/item.cpp"
"src/starbound/patch.cpp"
"src/starbound/frames.cpp"
"src/starpounds/weightstage.cpp"
"src/starpounds/types.cpp"
${SOURCE_LIST}
#"resources/resource.rc"
)
endif()