1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 09:39:43 +01:00

Remove use of add_definitions

I thought all of these were removed earlier but apparently not. Anyways,
add_definitions is bad because it pollutes the definitions of every
single target, we should be using target_compile_definitions instead.
This commit is contained in:
Misa 2022-08-22 21:49:01 -07:00
parent 69a31731ee
commit b4226631b9

View file

@ -220,7 +220,7 @@ if(NOT OFFICIAL_BUILD)
add_dependencies(VVVVVV GenerateVersion) add_dependencies(VVVVVV GenerateVersion)
# This lets Version.h know that Version.h.out exists # This lets Version.h know that Version.h.out exists
add_definitions(-DVERSION_H_OUT_EXISTS) target_compile_definitions(VVVVVV PRIVATE -DVERSION_H_OUT_EXISTS)
endif() endif()
endif() endif()
@ -236,9 +236,9 @@ if(ENABLE_WARNINGS)
endif() endif()
if(CUSTOM_LEVEL_SUPPORT STREQUAL "NO_EDITOR") if(CUSTOM_LEVEL_SUPPORT STREQUAL "NO_EDITOR")
add_definitions(-DNO_EDITOR) target_compile_definitions(VVVVVV PRIVATE -DNO_EDITOR)
elseif(CUSTOM_LEVEL_SUPPORT STREQUAL "DISABLED") elseif(CUSTOM_LEVEL_SUPPORT STREQUAL "DISABLED")
add_definitions(-DNO_CUSTOM_LEVELS -DNO_EDITOR) target_compile_definitions(VVVVVV PRIVATE -DNO_CUSTOM_LEVELS -DNO_EDITOR)
endif() endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")