File: CMakeLists.txt

package info (click to toggle)
treesheets 1%3A1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,540 kB
  • sloc: cpp: 7,640; makefile: 57; ansic: 9
file content (45 lines) | stat: -rw-r--r-- 1,387 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
37
38
39
40
41
42
43
44
45
# Sample build with makefile generator
#
#     cd <into-treesheets-source>
#     cmake -H. -Bb -DCMAKE_BUILD_TYPE=Release \
#         -DCMAKE_INSTALL_PREFIX=$PWD/i \
#         -DCMAKE_PROGRAM_PATH=<path-to-wx-config> # not always needed
#     cmake --build b --target install
#
# Sample build with IDE generator, like Xcode
#
#     cd <into-treesheets-source>
#     cmake -H. -Bb -GXcode \
#         -DCMAKE_INSTALL_PREFIX=$PWD/i \
#         -DCMAKE_PROGRAM_PATH=<path-to-wx-config> # not always needed
#     cmake --build b --config Release --target install
#
# Run program:
#
#     ./i/treesheets
#
# Should work on Windows, too. About helping FindwxWidgets to find wxWidgets
# consult: https://cmake.org/cmake/help/latest/module/FindwxWidgets.html

cmake_minimum_required(VERSION 3.1)
# CMAKE_CXX_STANDARD needs v3.1, could be lowered with minor effort

project(treesheets)

set(CMAKE_CXX_STANDARD 11)

find_package(wxWidgets REQUIRED aui adv core xml net)
include(${wxWidgets_USE_FILE})

file(GLOB sources src/*.cpp src/*.h)
add_executable(treesheets ${sources})

target_link_libraries(treesheets PRIVATE ${wxWidgets_LIBRARIES})

install(TARGETS treesheets DESTINATION bin)
install(DIRECTORY TS/ DESTINATION share/treesheets)

set(PACKAGE_VERSION "" CACHE STRING "Package version")
if(PACKAGE_VERSION)
add_definitions('-DPACKAGE_VERSION="${PACKAGE_VERSION}"')
endif(PACKAGE_VERSION)