Skip to content

Commit

Permalink
Merge pull request #6 from vasilenkoalexey/coroutine
Browse files Browse the repository at this point in the history
Coroutine using
  • Loading branch information
vasilenkoalexey authored Mar 28, 2022
2 parents 0a28cda + 5410c64 commit ba52117
Show file tree
Hide file tree
Showing 2 changed files with 1,288 additions and 1,494 deletions.
81 changes: 58 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.8)
cmake_minimum_required(VERSION 3.8)

project ("Boxed")
project("Boxed")

set(GLFW glfw-3.3.5)
set(GLEW glew-2.2.0)
Expand All @@ -11,35 +11,70 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/${GLFW} EXCLUDE_FROM_ALL)
add_subdirectory(${PROJECT_SOURCE_DIR}/${GLEW}/build/cmake EXCLUDE_FROM_ALL)
add_subdirectory(${PROJECT_SOURCE_DIR}/${JSON} EXCLUDE_FROM_ALL)

add_executable (boxed "boxed.cpp" "implot.h" "implot_internal.h" "implot.cpp" "implot_items.cpp" ${IMGUI}/imconfig.h ${IMGUI}/imgui.cpp ${IMGUI}/imgui.h ${IMGUI}/imgui_draw.cpp ${IMGUI}/imgui_internal.h ${IMGUI}/imgui_tables.cpp ${IMGUI}/imgui_widgets.cpp ${IMGUI}/imstb_rectpack.h ${IMGUI}/imstb_textedit.h ${IMGUI}/imstb_truetype.h ${IMGUI}/backends/imgui_impl_glfw.cpp ${IMGUI}/backends/imgui_impl_glfw.h ${IMGUI}/backends/imgui_impl_opengl2.cpp ${IMGUI}/backends/imgui_impl_opengl2.h)
add_executable(
boxed
"boxed.cpp"
"implot.h"
"implot_internal.h"
"implot.cpp"
"implot_items.cpp"
${IMGUI}/imconfig.h
${IMGUI}/imgui.cpp
${IMGUI}/imgui.h
${IMGUI}/imgui_draw.cpp
${IMGUI}/imgui_internal.h
${IMGUI}/imgui_tables.cpp
${IMGUI}/imgui_widgets.cpp
${IMGUI}/imstb_rectpack.h
${IMGUI}/imstb_textedit.h
${IMGUI}/imstb_truetype.h
${IMGUI}/backends/imgui_impl_glfw.cpp
${IMGUI}/backends/imgui_impl_glfw.h
${IMGUI}/backends/imgui_impl_opengl2.cpp
${IMGUI}/backends/imgui_impl_opengl2.h)

set_target_properties(boxed PROPERTIES CXX_STANDARD 20)

set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_DOCS
OFF
CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS
OFF
CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES
OFF
CACHE BOOL "" FORCE)
set(GLFW_INSTALL
OFF
CACHE BOOL "" FORCE)

set(BUILD_UTILS OFF CACHE BOOL "" FORCE)
set(BUILD_UTILS
OFF
CACHE BOOL "" FORCE)

set(JSON_Install OFF CACHE INTERNAL "" FORCE)
set(JSON_BuildTests OFF CACHE INTERNAL "" FORCE)
set(JSON_ImplicitConversions OFF CACHE INTERNAL "" FORCE)
set(JSON_Install
OFF
CACHE INTERNAL "" FORCE)
set(JSON_BuildTests
OFF
CACHE INTERNAL "" FORCE)
set(JSON_ImplicitConversions
OFF
CACHE INTERNAL "" FORCE)

target_link_libraries(boxed glfw glew_s nlohmann_json::nlohmann_json)

IF (WIN32)
target_link_options(boxed PRIVATE "/SUBSYSTEM:WINDOWS" "/ENTRY:mainCRTStartup")
ENDIF()
if(MSVC)
target_link_options(boxed PRIVATE "/SUBSYSTEM:WINDOWS"
"/ENTRY:mainCRTStartup")
endif()

target_include_directories(boxed PRIVATE
${PROJECT_SOURCE_DIR}/${GLEW}/include
)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcoroutines")
endif()

target_include_directories(boxed PRIVATE
${PROJECT_SOURCE_DIR}/${IMGUI}/
)
target_include_directories(boxed PRIVATE ${PROJECT_SOURCE_DIR}/${GLEW}/include)

target_include_directories(boxed PRIVATE
${PROJECT_SOURCE_DIR}/${JSON}/
)
target_include_directories(boxed PRIVATE ${PROJECT_SOURCE_DIR}/${IMGUI}/)

target_include_directories(boxed PRIVATE ${PROJECT_SOURCE_DIR}/${JSON}/)
Loading

0 comments on commit ba52117

Please sign in to comment.