-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
60 lines (49 loc) · 2.37 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
cmake_minimum_required(VERSION 3.21)
project(z-wave-protocol-controller)
# ##############################################################################
# Include Configurations
# ##############################################################################
include(cmake/include/version.cmake)
include(cmake/include/build_permutations.cmake)
include(cmake/modules/FindUnifySDK.cmake)
if(NOT DEFINED COMMON_LOCATION)
set(COMMON_LOCATION "${unifysdk_SOURCE_DIR}")
endif()
if(BUILD_TESTING)
# https://gitlab.kitware.com/cmake/cmake/-/issues/22813#note_1620373
option(BUILD_TESTING_PROPERTY_DISABLED "WARNING: Bypass some tests" True)
if(BUILD_TESTING_PROPERTY_DISABLED)
message(WARNING "TODO: Some tests are bypassed, please help fixing them")
endif()
include(${CMAKE_SOURCE_DIR}/components/testframework/target_add_unittest.cmake)
include(cmake/include/unittest.cmake)
endif()
include(cmake/include/doxygen.cmake)
# ##############################################################################
# Global includes
# ##############################################################################
include_directories(include ${CMAKE_CURRENT_BINARY_DIR}/include)
# ##############################################################################
# Subdirectories
# #############################################################################
add_subdirectory(applications)
# ##############################################################################
# Extra targets
# ##############################################################################
add_custom_target(unify-binary-dir
DEPENDS unify
COMMAND echo "Trick for building rust components depending on core libunify.so ${unifysdk_BINARY_DIR}"
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/components/
COMMAND ${CMAKE_COMMAND} -E create_symlink
${unifysdk_BINARY_DIR}/components/$<TARGET_FILE_NAME:unify>
${CMAKE_BINARY_DIR}/components/$<TARGET_FILE_NAME:unify>
)
include(cmake/include/package.cmake)
include(cmake/include/version_file.cmake)
if(BUILD_IMAGE_PROVIDER)
# message(STATUS "Force to build uic-i-p package in zpc project (until it is built in core)")
add_dependencies(uic_image_provider_build unify-binary-dir)
add_dependencies(uic-image-provider_deb uic-image-provider)
add_dependencies(uic-image-provider_deb package)
add_dependencies(package_archive uic-image-provider_deb)
endif()