-
Notifications
You must be signed in to change notification settings - Fork 11
/
CMakeLists.txt
62 lines (48 loc) · 1.81 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
cmake_minimum_required(VERSION 3.13)
project(rte C)
include(cmake/ov_functions.cmake)
include(cmake/ov_definitions.cmake)
# OV Core system
add_subdirectory(core/ovheaders)
add_subdirectory(core/codegen)
add_subdirectory(core/ov)
add_subdirectory(core/runtimeserver)
# OV core tools
add_subdirectory(core/acplt_builder)
add_subdirectory(core/dbutil)
# Core Communication Libraries
add_subdirectory(syslibs/ksbase)
SET(BUILD_OV_LIBRARY_kshist OFF CACHE BOOL "")
add_subdirectory(syslibs/kshist)
add_subdirectory(syslibs/kshttp)
add_subdirectory(syslibs/ksxdr)
add_subdirectory(syslibs/TCPbind)
add_subdirectory(syslibs/UDPbind)
option(OV_WITH_OPCUA "Enable building of opcua librar. Respectively, includes or searches for open62541." ON)
add_subdirectory(syslibs/opcua)
add_subdirectory(syslibs/ksapi)
# Function Block Libraries
add_subdirectory(syslibs/fb)
add_subdirectory(syslibs/ssc)
# HMI
add_subdirectory(syslibs/cshmi)
# Prevent cmake projects including this via add_subdirectory() from searching for OV elsewhere
set(CMAKE_DISABLE_FIND_PACKAGE_RTE TRUE CACHE BOOL "")
set(RTE_FOUND ON
CACHE BOOL "" FORCE)
# Add RTE_CMAKE_DIR property to ov library target and export it to allow other projects to find our cmake files
set_property(TARGET ov
PROPERTY RTE_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set_property(TARGET ov
APPEND
PROPERTY EXPORT_PROPERTIES "RTE_CMAKE_DIR")
# Export all targets to make build tree importable via find_package(OV)
export(EXPORT ${PROJECT_NAME}
FILE RTEConfig.cmake)
# Install export to make install tree importable via find_package(OV)
# FIXME development install does currently not work due to the issue with OV_MODEL_INCLUDE_DIRECTORIES (see below)
# install(EXPORT ${PROJECT_NAME}
# DESTINATION cmake
# COMPONENT development
# FILE OVConfig.cmake)
ov_finish_project()