Trakker/CMakeLists.txt

16 lines
682 B
CMake

cmake_minimum_required(VERSION 3.5)
project(trakker)
SET(CMAKE_CXX_STANDARD 17)
SET(CMAKE_CXX_STANDARD_REQUIRED True)
SET(CMAKE_CXX_FLAGS "-O3")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
include_directories(${CMAKE_BINARY_DIR})
find_package(Git)
find_package(ALSA REQUIRED)
find_package(LIBXMP REQUIRED)
find_package(Curses REQUIRED)
add_subdirectory(src)
add_custom_target(version ${CMAKE_COMMAND} -D SRC=${CMAKE_SOURCE_DIR}/src/trakker_version.h.in -D DST=${CMAKE_BINARY_DIR}/trakker_version.h -D GIT_EXECUTABLE=${GIT_EXECUTABLE} -P ${CMAKE_SOURCE_DIR}/GenerateVersionHeader.cmake)
add_dependencies(trakker version)
install(TARGETS trakker RUNTIME DESTINATION bin)