34 lines
754 B
CMake
34 lines
754 B
CMake
cmake_minimum_required (VERSION 3.8)
|
|
|
|
# Add source to this project's executable.
|
|
|
|
file(GLOB SRCS "src/*.cpp")
|
|
file(GLOB_RECURSE HDRS "include/*.hh")
|
|
|
|
|
|
add_executable(App
|
|
${SRCS}
|
|
${HDRS}
|
|
)
|
|
|
|
find_package(SDL2 CONFIG REQUIRED)
|
|
find_package(OpenGL REQUIRED COMPONENTS OpenGL)
|
|
find_package(GLEW REQUIRED)
|
|
find_package(GLUT REQUIRED)
|
|
find_package(glad CONFIG REQUIRED)
|
|
target_link_libraries(App PRIVATE
|
|
AppLib
|
|
SDL2::SDL2
|
|
SDL2::SDL2main
|
|
OpenGL::GL
|
|
GLEW::GLEW
|
|
GLUT::GLUT
|
|
glad::glad
|
|
)
|
|
|
|
target_include_directories(App PUBLIC "${CMAKE_SOURCE_DIR}/App/include/")
|
|
target_include_directories(App PUBLIC "${CMAKE_SOURCE_DIR}/AppLib/include/AppLib")
|
|
|
|
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
|
set_property(TARGET App PROPERTY CXX_STANDARD 20)
|
|
endif() |