76 lines
1.7 KiB
CMake
76 lines
1.7 KiB
CMake
cmake_minimum_required(VERSION 3.24)
|
|
|
|
# Need this to make FETCHCONTENT_QUIET off
|
|
if(POLICY CMP0077)
|
|
cmake_policy(SET CMP0077 NEW)
|
|
endif()
|
|
|
|
set(PROJECT_NAME DmxShow)
|
|
project(${PROJECT_NAME})
|
|
|
|
# Make sure this is here for nvim and fleet users
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
set(CMAKE_CXX_STANDARD 23)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|
set(FETCHCONTENT_QUIET OFF)
|
|
|
|
add_executable(${PROJECT_NAME} main.cpp tinyfiledialogs.c)
|
|
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
imgui
|
|
GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
|
GIT_TAG master
|
|
GIT_SHALLOW ON
|
|
GIT_PROGRESS ON
|
|
)
|
|
FetchContent_MakeAvailable(imgui)
|
|
|
|
FetchContent_Declare(
|
|
glfw
|
|
GIT_REPOSITORY https://github.com/glfw/glfw.git
|
|
GIT_TAG master
|
|
GIT_SHALLOW ON
|
|
GIT_PROGRESS ON
|
|
)
|
|
FetchContent_MakeAvailable(glfw)
|
|
|
|
FetchContent_Declare(
|
|
glew
|
|
GIT_REPOSITORY https://github.com/Perlmint/glew-cmake.git
|
|
GIT_TAG master
|
|
GIT_SHALLOW ON
|
|
GIT_PROGRESS ON
|
|
)
|
|
FetchContent_MakeAvailable(glew)
|
|
|
|
FetchContent_Declare(
|
|
json
|
|
GIT_REPOSITORY https://github.com/nlohmann/json.git
|
|
GIT_TAG master
|
|
GIT_SHALLOW ON
|
|
GIT_PROGRESS ON
|
|
)
|
|
FetchContent_MakeAvailable(json)
|
|
|
|
target_include_directories(${PROJECT_NAME} PRIVATE
|
|
${imgui_SOURCE_DIR}
|
|
${imgui_SOURCE_DIR}/backends
|
|
${glfw_SOURCE_DIR}/include
|
|
${glew_SOURCE_DIR}/include
|
|
${json_SOURCE_DIR}/include
|
|
)
|
|
|
|
target_sources(${PROJECT_NAME} PRIVATE
|
|
${imgui_SOURCE_DIR}/imgui.cpp
|
|
${imgui_SOURCE_DIR}/imgui_demo.cpp
|
|
${imgui_SOURCE_DIR}/imgui_draw.cpp
|
|
${imgui_SOURCE_DIR}/imgui_tables.cpp
|
|
${imgui_SOURCE_DIR}/imgui_widgets.cpp
|
|
${imgui_SOURCE_DIR}/backends/imgui_impl_glfw.cpp
|
|
${imgui_SOURCE_DIR}/backends/imgui_impl_opengl3.cpp
|
|
)
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE glfw libglew_static opengl32)
|