Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmake_minimum_required (VERSION 3.0)
- project (Relocate)
- message("Using CMake version ${CMAKE_VERSION}")
- message("Processing CMakeLists.txt")
- # Version number
- set (Relocate_VERSION_MAJOR 1)
- set (Relocate_VERSION_MINOR 0)
- # configure a header file to pass some of the CMake settings
- # to the source code
- configure_file (
- "${PROJECT_SOURCE_DIR}/Config.h.in"
- "${PROJECT_BINARY_DIR}/Config.h"
- )
- # add the binary tree to the search path for include files
- # so that we will find Config.h
- include_directories("${PROJECT_BINARY_DIR}" "${CMAKE_SOURCE_DIR}/deps/SFML/include")
- link_directories(${CMAKE_SOURCE_DIR}/deps/SFML/lib)
- # Define sources and executable
- set(EXECUTABLE_NAME "Relocate")
- add_executable(${EXECUTABLE_NAME} main.cpp)
- target_link_libraries(${EXECUTABLE_NAME} sfml-window sfml-system sfml-graphics sfml-audio sfml-network)
- # Install target
- install(TARGETS ${EXECUTABLE_NAME} DESTINATION bin)
- # CPack packaging
- include(InstallRequiredSystemLibraries)
- set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
- set(CPACK_PACKAGE_VERSION_MAJOR "${Relocate_VERSION_MAJOR}")
- set(CPACK_PACKAGE_VERSION_MINOR "${Relocate_VERSION_MINOR}")
- include(CPack)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement