2020-12-22 17:10:01 +00:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
project(imgui)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
find_package(Freetype REQUIRED)
|
2020-12-27 13:12:53 +00:00
|
|
|
pkg_search_module(GLM REQUIRED glm)
|
2020-12-22 17:10:01 +00:00
|
|
|
pkg_search_module(GLFW REQUIRED glfw3)
|
|
|
|
|
2021-01-12 22:28:41 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
|
|
|
|
2021-04-18 18:24:42 +00:00
|
|
|
add_library(imgui STATIC
|
2021-01-30 21:39:06 +00: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 12:48:23 +00:00
|
|
|
|
2021-01-30 21:39:06 +00:00
|
|
|
source/TextEditor.cpp
|
2021-03-02 12:48:23 +00:00
|
|
|
|
2021-01-30 21:39:06 +00:00
|
|
|
source/imgui_imhex_extensions.cpp
|
2021-03-02 12:48:23 +00:00
|
|
|
|
2021-01-30 21:39:06 +00:00
|
|
|
source/imnodes.cpp
|
2021-02-24 21:42:26 +00:00
|
|
|
|
2021-03-02 12:48:23 +00:00
|
|
|
source/implot.cpp
|
|
|
|
source/implot_items.cpp
|
|
|
|
source/implot_demo.cpp
|
|
|
|
|
2021-02-24 21:42:26 +00:00
|
|
|
fonts/fontawesome_font.c
|
2021-08-04 12:01:24 +00:00
|
|
|
fonts/codicons_font.c
|
2020-12-22 17:10:01 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_compile_definitions(IMGUI_IMPL_OPENGL_LOADER_GLAD)
|
|
|
|
|
|
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../glad ${CMAKE_CURRENT_BINARY_DIR}/external/glad)
|
|
|
|
|
2021-02-24 21:42:26 +00:00
|
|
|
target_include_directories(imgui PUBLIC include fonts ${FREETYPE_INCLUDE_DIRS} ${GLFW_INCLUDE_DIRS})
|
2020-12-22 17:10:01 +00:00
|
|
|
|
2020-12-27 13:12:53 +00:00
|
|
|
target_link_directories(imgui PUBLIC ${GLM_INCLUDE_DIRS} ${GLFW_LIBRARY_DIRS})
|
2020-12-22 17:10:01 +00:00
|
|
|
|
2021-01-06 18:19:01 +00:00
|
|
|
if (WIN32)
|
2021-04-18 18:24:42 +00:00
|
|
|
target_link_libraries(imgui Freetype::Freetype glad glfw3)
|
2021-01-06 18:19:01 +00:00
|
|
|
elseif (UNIX)
|
|
|
|
target_link_libraries(imgui Freetype::Freetype glad glfw)
|
|
|
|
endif()
|