From dc5eaf7b6708182e5ec53a93529925df39f4c744 Mon Sep 17 00:00:00 2001 From: Marco Antonio Jaguaribe Costa Date: Thu, 26 Jan 2023 20:11:58 -0300 Subject: [PATCH] better name for the executable target --- CMakeLists.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa280796e..e3d74ae6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,20 +132,20 @@ set(debugFlags $,JA2BETAVERSION;JA2TESTVERSION;DEBUG_ATTACKBU # TODO: refactor preprocessor usage onto, ideally, a single translation unit foreach(lang IN LISTS LangTargets) foreach(exe IN LISTS ApplicationTargets) - set(targPrefix ${exe}_${lang}) + set(Executable ${exe}_${lang}) # executable for an application/language combination, e.g. JA2_ENGLISH.exe - add_executable(${targPrefix} WIN32) - target_sources(${targPrefix} PRIVATE ${Ja2Src}) + add_executable(${Executable} WIN32) + target_sources(${Executable} PRIVATE ${Ja2Src}) # Good libraries have already been built, can be simply linked here - target_link_libraries(${targPrefix} PRIVATE ${Ja2_Libraries}) + target_link_libraries(${Executable} PRIVATE ${Ja2_Libraries}) # for each app/lang combination, the Very Bad libraries need to be built, # with the appropriate preprocessor definitions foreach(lib IN LISTS Ja2_Libs) # syntactic sugar to hopefully make this more readable - set(tgt ${targPrefix}_${lib}) + set(tgt ${Executable}_${lib}) set(isEditor $) set(isUb $) set(isUbEditor $) @@ -161,11 +161,11 @@ foreach(lang IN LISTS LangTargets) ${debugFlags} ${lang} ) - target_link_libraries(${targPrefix} PUBLIC ${tgt}) + target_link_libraries(${Executable} PUBLIC ${tgt}) endforeach() # only SGP depends on these - target_link_libraries(${targPrefix}_SGP PRIVATE "ddraw.lib" "${PROJECT_SOURCE_DIR}/fmodvc.lib") - target_link_libraries(${targPrefix}_SGP PUBLIC libpng) + target_link_libraries(${Executable}_SGP PRIVATE "ddraw.lib" "${PROJECT_SOURCE_DIR}/fmodvc.lib") + target_link_libraries(${Executable}_SGP PUBLIC libpng) endforeach() endforeach()