Advertisement
Guest User

Untitled

a guest
Jun 15th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 1.18 KB | None | 0 0
  1. cmake_minimum_required (VERSION 3.0)
  2. project (Relocate)
  3.  
  4. message("Using CMake version ${CMAKE_VERSION}")
  5. message("Processing CMakeLists.txt")
  6.  
  7. # Version number
  8. set (Relocate_VERSION_MAJOR 1)
  9. set (Relocate_VERSION_MINOR 0)
  10.  
  11. # configure a header file to pass some of the CMake settings
  12. # to the source code
  13. configure_file (
  14.   "${PROJECT_SOURCE_DIR}/Config.h.in"
  15.   "${PROJECT_BINARY_DIR}/Config.h"
  16.   )
  17.  
  18. # add the binary tree to the search path for include files
  19. # so that we will find Config.h
  20. include_directories("${PROJECT_BINARY_DIR}" "${CMAKE_SOURCE_DIR}/deps/SFML/include")
  21. link_directories(${CMAKE_SOURCE_DIR}/deps/SFML/lib)
  22.  
  23. # Define sources and executable
  24. set(EXECUTABLE_NAME "Relocate")
  25. add_executable(${EXECUTABLE_NAME} main.cpp)
  26.  
  27. target_link_libraries(${EXECUTABLE_NAME} sfml-window sfml-system sfml-graphics sfml-audio sfml-network)
  28.  
  29. # Install target
  30. install(TARGETS ${EXECUTABLE_NAME} DESTINATION bin)
  31.  
  32. # CPack packaging
  33. include(InstallRequiredSystemLibraries)
  34. set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
  35. set(CPACK_PACKAGE_VERSION_MAJOR "${Relocate_VERSION_MAJOR}")
  36. set(CPACK_PACKAGE_VERSION_MINOR "${Relocate_VERSION_MINOR}")
  37. include(CPack)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement