Okay, actually fix link ordering

This commit is contained in:
Luke Street 2021-05-27 17:04:47 -04:00
parent 3524ac2281
commit 5167a33605
2 changed files with 8 additions and 2 deletions

View File

@ -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)

View File

@ -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)