From 5167a336051f49f27cd12d7f38904bb9e5d292c6 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Thu, 27 May 2021 17:04:47 -0400 Subject: [PATCH] Okay, actually fix link ordering --- Runtime/CMakeLists.txt | 6 ++++-- imgui/CMakeLists.txt | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Runtime/CMakeLists.txt b/Runtime/CMakeLists.txt index 9e79971b0..460a280bd 100644 --- a/Runtime/CMakeLists.txt +++ b/Runtime/CMakeLists.txt @@ -136,12 +136,13 @@ endif() endfunction() set(RUNTIME_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) -set(RUNTIME_LIBRARIES ${HECL_APPLICATION_REPS_TARGETS_LIST} RetroDataSpec NESEmulator +set(RUNTIME_LIBRARIES ${HECL_APPLICATION_REPS_TARGETS_LIST} RetroDataSpec AssetNameMapNull NESEmulator libjpeg-turbo jbus kabufuda discord-rpc logvisor OptickCore imgui) add_runtime_common_library(RuntimeCommon ${RUNTIME_SOURCES_A}) target_include_directories(RuntimeCommon PUBLIC ${RUNTIME_INCLUDES}) target_link_libraries(RuntimeCommon PUBLIC ${RUNTIME_LIBRARIES}) + add_runtime_common_library(RuntimeCommonB ${RUNTIME_SOURCES_B}) target_include_directories(RuntimeCommonB PUBLIC ${RUNTIME_INCLUDES}) target_link_libraries(RuntimeCommonB PUBLIC ${RUNTIME_LIBRARIES}) @@ -206,7 +207,8 @@ elseif(UNIX) endif() add_executable(metaforce CMain.cpp ${PLAT_SRCS} ImGuiConsole.hpp ImGuiConsole.cpp ImGuiEntitySupport.hpp ImGuiEntitySupport.cpp) -target_link_libraries(metaforce PUBLIC RuntimeCommon RuntimeCommonB AssetNameMapNull ${PLAT_LIBS}) +# RUNTIME_LIBRARIES repeated here for link ordering +target_link_libraries(metaforce PUBLIC RuntimeCommon RuntimeCommonB ${RUNTIME_LIBRARIES} ${PLAT_LIBS}) if(COMMAND add_sanitizers) add_sanitizers(metaforce) diff --git a/imgui/CMakeLists.txt b/imgui/CMakeLists.txt index e398dc72b..685cc1e01 100644 --- a/imgui/CMakeLists.txt +++ b/imgui/CMakeLists.txt @@ -11,6 +11,10 @@ add_library(imgui ) target_include_directories(imgui PUBLIC ${CMAKE_SOURCE_DIR}/extern/imgui ${CMAKE_CURRENT_SOURCE_DIR}) target_compile_definitions(imgui PUBLIC IMGUI_USER_CONFIG="imconfig_user.h") +if (CMAKE_COMPILER_IS_GNUCXX) + # currently explicitly ignored for clang in imgui code, but not gcc (yet) + target_compile_options(imgui PRIVATE -Wno-deprecated-enum-enum-conversion) +endif() target_link_libraries(imgui PRIVATE boo hecl-light RetroDataSpec) bintoc_compress(NotoMono.cpp NotoMono-Regular.ttf NOTO_MONO_FONT)