CMakeLists.txt 794 B

1234567891011121314151617181920212223
  1. cmake_minimum_required(VERSION 3.13)
  2. project(dot-sort VERSION 0.4.0)
  3. set(CMAKE_CXX_STANDARD 17)
  4. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
  5. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
  6. set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
  7. set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/static)
  8. include_directories(${CMAKE_SOURCE_DIR}/include)
  9. file(GLOB_RECURSE SOURCES ${CMAKE_SOURCE_DIR}/src/*.cpp)
  10. find_package(SFML 2.5 COMPONENTS system window graphics REQUIRED)
  11. add_executable(dot_sort ${SOURCES})
  12. target_link_libraries(dot_sort sfml-window sfml-graphics sfml-system) #SFML libs
  13. target_link_libraries(dot_sort stdc++fs) #Lib std c++
  14. file(GLOB SPRITES ${CMAKE_SOURCE_DIR}/res/png/*)
  15. file(COPY ${SPRITES} DESTINATION "${CMAKE_BINARY_DIR}/bin/res")