You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
|
|
|
|
find_package(SDL2 REQUIRED) |
|
find_package(OpenGL REQUIRED) |
|
find_package(GLEW REQUIRED) |
|
find_package(ASSIMP REQUIRED) |
|
|
|
include_directories(${SDL2_INCLUDE_DIRS}) |
|
include_directories(${OPENGL_INCLUDE_DIR}) |
|
include_directories(${GLEW_INCLUDE_DIRS}) |
|
|
|
file(GLOB testgamefiles |
|
"*.h" |
|
"*.cpp" |
|
"*/*.cpp" |
|
"*/*.h" |
|
) |
|
|
|
add_executable(testgame ${testgamefiles}) |
|
|
|
set_property(TARGET testgame PROPERTY CXX_STANDARD 20) |
|
|
|
target_link_libraries(testgame ${GLEW_LIBRARIES}) |
|
target_link_libraries(testgame ${OPENGL_LIBRARIES}) |
|
target_link_libraries(testgame ${SDL2_LIBRARIES}) |
|
target_link_libraries(testgame ${ASSIMP_LIBRARIES}) |
|
|
|
target_link_libraries(testgame fmt::fmt) |
|
target_link_libraries(testgame nlohmann_json::nlohmann_json) |
|
|
|
add_custom_command( |
|
TARGET testgame POST_BUILD |
|
COMMAND ${CMAKE_COMMAND} -E create_symlink |
|
${CMAKE_SOURCE_DIR}/data $<TARGET_FILE_DIR:testgame>/data |
|
COMMENT "Symlinking shaders" VERBATIM |
|
) |
|
|
|
#add_custom_target(copy_assets |
|
# COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/copy-assets.cmake |
|
#) |
|
|
|
#add_dependencies(testgame copy_assets) |
|
|
|
|
|
|