-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Follow-up discussion to #162.
So far, we can use #if FEATURE_FLAG to conditionally include functions/tokens/..., but this is not enough.
Between different versions, new files were introduced or old files were deleted as well. Currently however, all of them are included with add_library(...) in CMakeLists.txt without further conditions.
How should we handle adding/removing entire files depending on the version?
Suggestion A: #ifdef the entire file.
Suggestion B:
Move add_compile_definitions(SEAD_VERSION=CMAKE_SEAD_VERSION) from the application into sead's CMakeLists.txt, with CMAKE_SEAD_VERSION being a CMake variable (=> set(CMAKE_SEAD_VERSION "SMO") in application). Then, conditionally include files using CMake conditions (if(CMAKE_SEAD_VERSION STREQUAL "SMO")).
Suggestion C:
Combine B with removing the entire seadVersion.h, and handle everything in a separate CMakeLists.txt-file, which adds more compile definitions depending on the selected version.
Suggestion D?
Please suggest other things if you have a different idea.