ferx/engine/CMakeLists.txt

20 lines
615 B
CMake
Raw Normal View History

2024-07-29 15:59:40 +00:00
project(engine)
set(ENGINE_SOURCE_DIR src)
set(ENGINE_INCLUDE_DIR include)
file(GLOB_RECURSE ENGINE_SOURCES ${ENGINE_SOURCE_DIR}/*.cpp)
add_library(${PROJECT_NAME})
if(CMAKE_BUILD_TYPE STREQUAL "Release")
target_compile_definitions(${PROJECT_NAME} PUBLIC RESOURCES_PATH="./resources/")
else()
target_compile_definitions(${PROJECT_NAME} PUBLIC RESOURCES_PATH="${CMAKE_SOURCE_DIR}/editor/resources/")
endif()
2024-07-29 15:59:40 +00:00
target_sources(${PROJECT_NAME} PRIVATE ${ENGINE_SOURCES})
target_include_directories(${PROJECT_NAME} PUBLIC ${ENGINE_INCLUDE_DIR})
2024-07-29 15:59:40 +00:00
target_link_libraries(${PROJECT_NAME} glfw glad glm imgui stb)