31 lines
762 B
CMake
31 lines
762 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} PUBLIC utils)
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE glfw)
|
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC include/) |