Added yaze CMakeLists.txt
This commit is contained in:
49
src/CMakeLists.txt
Normal file
49
src/CMakeLists.txt
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
# Boost library --------------------------------------------------------------------------------------------------
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
find_package(Boost REQUIRED)
|
||||
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|
||||
|
||||
# SDL libraries --------------------------------------------------------------------------------------------------
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
||||
# ImGui library --------------------------------------------------------------------------------------------------
|
||||
set(IMGUI_PATH "Library/imgui") # Set where the ImGui files are stored
|
||||
file(GLOB IMGUI_SOURCES ${IMGUI_PATH}/*.cpp) # Compile as static library
|
||||
add_library("ImGui" STATIC ${IMGUI_SOURCES})
|
||||
target_include_directories("ImGui" PUBLIC ${IMGUI_PATH})
|
||||
target_include_directories(ImGui PUBLIC ${SDL2_INCLUDE_DIR})
|
||||
target_compile_definitions(ImGui PUBLIC IMGUI_IMPL_OPENGL_LOADER_CUSTOM=<SDL2/SDL_opengl.h> GL_GLEXT_PROTOTYPES=1)
|
||||
|
||||
# Executable Linkage --------------------------------------------------------------------------------------
|
||||
add_executable(
|
||||
yaze
|
||||
yaze.cc
|
||||
Application/Core/Controller.cc
|
||||
Application/Core/Renderer.cc
|
||||
Application/Core/Window.cc
|
||||
Application/Events/Event.cc
|
||||
Application/View/Editor.cc
|
||||
# GUI libraries
|
||||
${IMGUI_PATH}/imgui.cpp
|
||||
${IMGUI_PATH}/imgui_demo.cpp
|
||||
${IMGUI_PATH}/imgui_draw.cpp
|
||||
${IMGUI_PATH}/imgui_widgets.cpp
|
||||
${IMGUI_PATH}/backends/imgui_impl_sdl.cpp
|
||||
${IMGUI_PATH}/backends/imgui_impl_sdlrenderer.cpp
|
||||
${IMGUI_PATH}/misc/cpp/imgui_stdlib.cpp
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
yaze PUBLIC
|
||||
Library/
|
||||
Application/
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
yaze
|
||||
${BOOST_LIBRARIES}
|
||||
${SDL2_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
ImGui
|
||||
)
|
||||
Reference in New Issue
Block a user