2023-09-13 23:14:31 -04:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
2023-02-24 22:34:35 -05:00
|
|
|
project(trakker)
|
|
|
|
SET(CMAKE_CXX_STANDARD 17)
|
|
|
|
SET(CMAKE_CXX_STANDARD_REQUIRED True)
|
2023-09-13 23:14:31 -04:00
|
|
|
SET(CMAKE_CXX_FLAGS "-O3")
|
|
|
|
include_directories(${CMAKE_BINARY_DIR})
|
|
|
|
find_package(Git)
|
2023-02-24 22:34:35 -05:00
|
|
|
find_package(ALSA REQUIRED)
|
2023-09-13 23:14:31 -04:00
|
|
|
find_package(LIBXMP REQUIRED)
|
2023-02-24 22:34:35 -05:00
|
|
|
find_package(Curses REQUIRED)
|
|
|
|
add_subdirectory(src)
|
2023-09-13 23:14:31 -04:00
|
|
|
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)
|
2023-02-24 22:34:35 -05:00
|
|
|
install(TARGETS trakker RUNTIME DESTINATION bin)
|