-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
35 lines (21 loc) · 895 Bytes
/
CMakeLists.txt
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
project(adaside)
cmake_minimum_required(VERSION 3.1)
# Configure use of Qt
find_package(Qt5 REQUIRED COMPONENTS Core)
add_definitions(${Qt5Core_DEFINITIONS})
add_definitions(-fPIC)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "-g")
# Configure AdaSide
FIND_PROGRAM(ADASIDE NAMES "adaside")
if ("${ADASIDE}" STREQUAL "ADASIDE-NOTFOUND")
message(FATAL_ERROR "AdaSide code generator is required.")
endif()
message(STATUS "Use ${ADASIDE} to generate binding code")
# Configure GNAT project files
string(REPLACE ";" "\", \"-I" Qt5Core_INCLUDE_SWITCHES "${Qt5Core_INCLUDE_DIRS}")
string(CONCAT Qt5Core_INCLUDE_SWITCHES "\"-I" ${Qt5Core_INCLUDE_SWITCHES} "\"")
get_target_property(Qt5Core_IMPORTED_LOCATION Qt5::Core IMPORTED_LOCATION_RELEASE)
configure_file(gnat/qtada_config.gpr.in gnat/qtada_config.gpr @ONLY)
add_subdirectory(sources/QtCore)