Skip to content
Snippets Groups Projects
CMakeLists.txt 1.14 KiB
Newer Older
Gauthier Quesnel's avatar
Gauthier Quesnel committed
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(irritator VERSION 0.1.0.0 LANGUAGES CXX)
Gauthier Quesnel's avatar
Gauthier Quesnel committed

include(GNUInstallDirs)

option(WITH_GUI "Build the graphical user interface [default: ON]" ON)
option(WITH_DEBUG "enable maximium debug code. [default: ON]" ON)
Gauthier Quesnel's avatar
Gauthier Quesnel committed
find_package(Threads REQUIRED)
add_library(threads INTERFACE IMPORTED)
set_property(TARGET threads PROPERTY
  INTERFACE_LINK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})

find_package(Fontconfig)

Gauthier Quesnel's avatar
Gauthier Quesnel committed
add_definitions(-DFMT_HEADER_ONLY)
Gauthier Quesnel's avatar
Gauthier Quesnel committed
include_directories(${CMAKE_SOURCE_DIR}/external/leaf/include)
Gauthier Quesnel's avatar
Gauthier Quesnel committed
include_directories(${CMAKE_SOURCE_DIR}/external/fmt/include)
include_directories(${CMAKE_SOURCE_DIR}/external/ut/include)
include_directories(${CMAKE_SOURCE_DIR}/external/rapidjson/include)
include_directories(${CMAKE_SOURCE_DIR}/external/random123/include)
Gauthier Quesnel's avatar
Gauthier Quesnel committed

file(COPY examples/
  DESTINATION
  ${CMAKE_BINARY_DIR}/app/gui/share/irritator-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}/components)

install(DIRECTORY examples/
  DESTINATION
  ${CMAKE_INSTALL_FULL_DATAROOTDIR}/irritator-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}/components)

Gauthier Quesnel's avatar
Gauthier Quesnel committed
enable_testing()
add_subdirectory(lib)
add_subdirectory(app)