Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
graphite/engine/platform/CMakeLists.txt

40 lines
941 B
Text
Raw Normal View History

2024-01-03 16:05:02 -05:00
if(EMSCRIPTEN)
set(SOURCE_FILES
${SOURCE_FILES}
emscripten/filesystem.cpp
emscripten/gfx.cpp
emscripten/inputpump.cpp
emscripten/platform.cpp)
elseif(UNIX)
set(SOURCE_FILES
${SOURCE_FILES}
unix/filesystem.cpp)
elseif(WIN32)
set(SOURCE_FILES
${SOURCE_FILES}
windows/filesystem.cpp)
endif()
if(NOT EMSCRIPTEN)
set(SOURCE_FILES
${SOURCE_FILES}
glfw/gfx.cpp
glfw/inputpump.cpp
glfw/platform.cpp)
endif()
add_library(Platform ${SOURCE_FILES})
target_link_libraries(Platform Input physfs)
if(NOT EMSCRIPTEN)
target_link_libraries(Platform glfw)
endif()
include_directories(common)
include_directories(${UTILITY_INCLUDE_DIR} ${INPUT_INCLUDE_DIR})
include_directories(SYSTEM
${LIBRARY_VULKAN_INCLUDE_DIR}
${LIBRARY_PHYSFS_INCLUDE_DIR}
${LIBRARY_GLFW_INCLUDE_DIRS}
${LIBRARY_GLM_INCLUDE_DIR})