2020-12-22 18:10:01 +01:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
project(imgui)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
find_package(Freetype REQUIRED)
|
2021-12-14 20:16:59 +01:00
|
|
|
find_package(OpenGL REQUIRED)
|
2020-12-22 18:10:01 +01:00
|
|
|
pkg_search_module(GLFW REQUIRED glfw3)
|
|
|
|
|
2021-10-09 23:07:58 +02:00
|
|
|
if (UNIX)
|
|
|
|
find_package(OpenGL REQUIRED)
|
|
|
|
endif ()
|
|
|
|
|
2021-10-16 11:37:29 +02:00
|
|
|
add_library(imgui OBJECT
|
2021-01-30 22:39:06 +01:00
|
|
|
source/imgui.cpp
|
|
|
|
source/imgui_demo.cpp
|
|
|
|
source/imgui_draw.cpp
|
|
|
|
source/imgui_freetype.cpp
|
|
|
|
source/imgui_impl_glfw.cpp
|
|
|
|
source/imgui_impl_opengl3.cpp
|
|
|
|
source/imgui_tables.cpp
|
|
|
|
source/imgui_widgets.cpp
|
2021-03-02 13:48:23 +01:00
|
|
|
|
2021-10-16 11:37:29 +02:00
|
|
|
source/cimgui.cpp
|
|
|
|
|
2021-01-30 22:39:06 +01:00
|
|
|
source/TextEditor.cpp
|
2021-03-02 13:48:23 +01:00
|
|
|
|
2021-01-30 22:39:06 +01:00
|
|
|
source/imnodes.cpp
|
2021-02-24 22:42:26 +01:00
|
|
|
|
2021-03-02 13:48:23 +01:00
|
|
|
source/implot.cpp
|
|
|
|
source/implot_items.cpp
|
|
|
|
source/implot_demo.cpp
|
|
|
|
|
2022-07-26 14:59:08 +02:00
|
|
|
source/fonts/fontawesome_font.c
|
|
|
|
source/fonts/codicons_font.c
|
|
|
|
source/fonts/unifont_font.c
|
2020-12-22 18:10:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
add_compile_definitions(IMGUI_IMPL_OPENGL_LOADER_GLAD)
|
|
|
|
|
2022-07-26 14:59:08 +02:00
|
|
|
target_include_directories(imgui PUBLIC include ${FREETYPE_INCLUDE_DIRS} ${GLFW_INCLUDE_DIRS})
|
2020-12-22 18:10:01 +01:00
|
|
|
|
2021-08-25 11:46:40 +02:00
|
|
|
target_link_directories(imgui PUBLIC ${GLFW_LIBRARY_DIRS})
|
2020-12-22 18:10:01 +01:00
|
|
|
|
2021-01-06 19:19:01 +01:00
|
|
|
if (WIN32)
|
2021-10-16 11:37:29 +02:00
|
|
|
target_link_libraries(imgui PUBLIC Freetype::Freetype glfw3 opengl32.lib)
|
2021-01-06 19:19:01 +01:00
|
|
|
elseif (UNIX)
|
2021-10-16 11:37:29 +02:00
|
|
|
target_link_libraries(imgui PUBLIC Freetype::Freetype glfw OpenGL::GL)
|
2021-01-06 19:19:01 +01:00
|
|
|
endif()
|