36 lines
925 B
CMake
36 lines
925 B
CMake
if (POLICY CMP0141)
|
|
cmake_policy(SET CMP0141 NEW)
|
|
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
|
|
endif()
|
|
|
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
|
|
project(engine-api)
|
|
|
|
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS
|
|
"src/*.cpp"
|
|
"src/*.c"
|
|
"include/*.hpp"
|
|
"include/*.h"
|
|
)
|
|
|
|
|
|
# Find dependencies
|
|
|
|
find_package(glfw3 CONFIG REQUIRED)
|
|
|
|
# Link library
|
|
|
|
add_library(${PROJECT_NAME} ${SOURCES})
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE p7)
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC utils)
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE glfw)
|
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC include/)
|
|
|
|
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
|
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 20)
|
|
endif() |