[go: up one dir, main page]

File: CMakeLists.txt

package info (click to toggle)
libformfactor 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,288 kB
  • sloc: cpp: 17,289; python: 382; makefile: 15
file content (36 lines) | stat: -rw-r--r-- 812 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)

project(demo_using_formfactor VERSION 0.1.2 LANGUAGES CXX)

## Compiler settings.
option(WERROR "Treat warnings as errors" OFF)

set(CMAKE_CXX_STANDARD 17)
if(WIN32)
    set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
    message(STATUS "compiling for Windows")
else()
    option(PEDANTIC "Compile with pedantic warnings" ON)
    if(PEDANTIC)
        add_compile_options(-pedantic -Wall)
    endif()
endif()
add_compile_options(-O2)
if(WERROR)
    add_compile_options(-Werror)
endif()

## Dependencies
find_package(LibHeinz REQUIRED CONFIG)
find_package(formfactor REQUIRED CONFIG)

## Source
set(demos
    octahedron
    )

## Configure executable
foreach(app ${demos})
    add_executable(${app} "${app}.cpp")
    target_link_libraries(${app} formfactor)
endforeach()