CMakeLists.txt 442 B

123456789101112131415161718192021222324
  1. cmake_minimum_required(VERSION 3.12)
  2. file(MAKE_DIRECTORY assets)
  3. get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
  4. string(REPLACE " " "_" PROJECT_NAME ${PROJECT_NAME})
  5. project(${PROJECT_NAME})
  6. set(CMAKE_CXX_STANDARD 11)
  7. file(GLOB SOURCES
  8. "*.hh"
  9. "*.cc"
  10. )
  11. add_executable(${PROJECT_NAME} ${SOURCES})
  12. target_link_libraries(${PROJECT_NAME} SDL2 SDL2_image SDL2_ttf )
  13. file(COPY assets DESTINATION ${CMAKE_BINARY_DIR})