forked from hendradarwin/imgui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
70 lines (48 loc) · 1.75 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
cmake_minimum_required(VERSION 3.24)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" CACHE STRING "Choose MSVC runtime library")
# set c++ standard
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
project(imbrowser)
add_library(imgui STATIC
${CMAKE_CURRENT_LIST_DIR}/imgui.cpp
${CMAKE_CURRENT_LIST_DIR}/imgui_demo.cpp
${CMAKE_CURRENT_LIST_DIR}/imgui_draw.cpp
${CMAKE_CURRENT_LIST_DIR}/imgui_widgets.cpp
${CMAKE_CURRENT_LIST_DIR}/whereami.c
${CMAKE_CURRENT_LIST_DIR}/whereami.h)
target_sources(imgui PRIVATE ${CMAKE_CURRENT_LIST_DIR}/imgui_browser.cpp)
target_include_directories(imgui PUBLIC ${CMAKE_CURRENT_LIST_DIR})
set(CEF_ROOT ${CMAKE_CURRENT_LIST_DIR}/thirdparty/cef)
add_definitions(-DOS_WIN)
set(CMAKE_CONFIGURATION_TYPES Debug Release)
set_property(GLOBAL PROPERTY OS_FOLDERS ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package(CEF REQUIRED)
if(MSVC)
add_definitions(-DUNICODE -D_UNICODE)
endif()
# set(
# CMAKE_RUNTIME_OUTPUT_DIRECTORY
# ${CMAKE_HOME_DIRECTORY}/bin
# )
# set(
# CMAKE_LIBRARY_OUTPUT_DIRECTORY
# ${CMAKE_HOME_DIRECTORY}/lib
# )
# set(
# TARGET_OUTPUT_DIRECTORY
# ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIGURATION>
# )
add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper)
# Display configuration settings.
PRINT_CEF_CONFIG()
if(EXISTS "${CEF_ROOT}/tests")
add_subdirectory(${CEF_ROOT}/tests/cefsimple)
add_subdirectory(${CEF_ROOT}/tests/gtest)
add_subdirectory(${CEF_ROOT}/tests/ceftests)
add_subdirectory(${CEF_ROOT}/tests/cefclient)
endif()
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/examples/example_sdl_opengl2)