metaforce/imgui/CMakeLists.txt

37 lines
1.6 KiB
CMake
Raw Normal View History

2021-05-24 14:25:31 -07:00
add_library(imgui
../extern/imgui/imgui.cpp
../extern/imgui/imgui_demo.cpp
../extern/imgui/imgui_draw.cpp
../extern/imgui/imgui_tables.cpp
../extern/imgui/imgui_widgets.cpp
../extern/imgui/misc/cpp/imgui_stdlib.cpp
2022-02-16 22:03:00 -08:00
# ../imgui-sys/third-party/cimgui.cpp
2021-05-24 14:25:31 -07:00
ImGuiEngine.cpp
ImGuiEngine.hpp
NotoMono.cpp
2021-05-26 21:56:25 -07:00
MetaforceIcon.cpp
2021-05-24 14:25:31 -07:00
)
target_include_directories(imgui PUBLIC ${CMAKE_SOURCE_DIR}/extern/imgui ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR})
2022-02-16 22:03:00 -08:00
target_compile_definitions(imgui PUBLIC IMGUI_USER_CONFIG="imconfig_user.h") # IMGUI_USE_WCHAR32
2021-05-27 14:04:47 -07:00
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()
2022-03-14 16:48:08 -07:00
target_link_libraries(imgui PRIVATE aurora zeus logvisor ${ZLIB_LIBRARIES})
2021-05-24 14:25:31 -07:00
# Optional, replaces stb_freetype if available
find_package(Freetype)
2022-05-27 12:52:16 -07:00
# Permit disabling for macOS universal builds
option(IMGUI_USE_FREETYPE "Enable freetype with imgui" ON)
if (FREETYPE_FOUND AND IMGUI_USE_FREETYPE)
target_sources(imgui PRIVATE ../extern/imgui/misc/freetype/imgui_freetype.cpp)
2022-02-08 23:08:07 -08:00
target_compile_definitions(imgui PRIVATE IMGUI_ENABLE_FREETYPE)
target_link_libraries(imgui PRIVATE Freetype::Freetype)
endif ()
bintoc_compress(NotoMono.cpp NotoMono-Regular.ttf NOTO_MONO_FONT)
2021-05-26 21:56:25 -07:00
bintoc(MetaforceIcon.cpp ../Runtime/platforms/freedesktop/256x256/apps/metaforce.png METAFORCE_ICON)
2022-01-31 16:06:54 -08:00
#add_shader(ImGuiShader)
#target_link_libraries(shader_ImGuiShader PRIVATE hecl-light)