-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakelists.txt
31 lines (27 loc) · 968 Bytes
/
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
cmake_minimum_required(VERSION 3.9.0)
project(imjson)
add_library(imjsonlib STATIC
include/imjson.h
include/imjson.cpp
)
target_include_directories(imjsonlib
PUBLIC ${CMAKE_SOURCE_DIR}/include
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/dependencies
)
file(GLOB IMGUI_SOURCES
dependencies/imgui/*.cpp
dependencies/imgui/*.h
)
add_library(imgui STATIC ${IMGUI_SOURCES})
target_include_directories(imgui PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/GLFW/include)
add_library(glfw STATIC IMPORTED)
set_target_properties(glfw PROPERTIES
IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/GLFW/lib-vc2022/glfw3.lib
)
target_include_directories(glfw INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/GLFW/include)
add_executable(imjson
example/main.cpp
include/imjson.cpp
)
target_include_directories(imjson PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/dependencies)
target_link_libraries(imjson PRIVATE imjsonlib imgui glfw opengl32)