Skip to content

Commit 1b7fa5c

Browse files
author
Aliaksandr Adziareika
committed
<TBBAS-2530> Build project using prebuilt openDAQ binaries
1 parent 8ac5256 commit 1b7fa5c

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ if(OPENDAQ_DEVICE_EXAMPLE_ENABLE_SERVER_APP)
3030
set(OPENDAQ_ENABLE_NATIVE_STREAMING ON CACHE BOOL "" FORCE)
3131
endif()
3232

33+
if (OPENDAQ_ENABLE_TESTS)
34+
message(STATUS "Unit tests are ENABLED")
35+
enable_testing()
36+
endif()
37+
3338
add_subdirectory(external)
39+
message(STATUS "Variable OPENDAQ_MODULES_DIR = ${OPENDAQ_MODULES_DIR}")
3440
add_subdirectory(example_module)
3541

3642
if(OPENDAQ_DEVICE_EXAMPLE_ENABLE_SERVER_APP)

external/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
55
message(FATAL_ERROR "In-source build is not supported!")
66
endif()
77

8-
include(FetchContent)
8+
# include(FetchContent)
99

1010
add_subdirectory(openDAQ)

external/openDAQ/CMakeLists.txt

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
set(OPENDAQ_ENABLE_TESTS false)
22

3-
FetchContent_Declare(
4-
openDAQ
5-
GIT_REPOSITORY https://github.com/openDAQ/openDAQ.git
6-
GIT_TAG v3.20.1
7-
GIT_PROGRESS ON
8-
SYSTEM
9-
FIND_PACKAGE_ARGS 3.20.1 GLOBAL
10-
)
3+
# FetchContent_Declare(
4+
# openDAQ
5+
# GIT_REPOSITORY https://github.com/openDAQ/openDAQ.git
6+
# GIT_TAG v3.20.1
7+
# GIT_PROGRESS ON
8+
# SYSTEM
9+
# FIND_PACKAGE_ARGS 3.20.1 GLOBAL
10+
# )
1111

12-
FetchContent_MakeAvailable(openDAQ)
12+
# FetchContent_MakeAvailable(openDAQ)
13+
# if(DEFINED ENV{openDAQ_ROOT})
14+
# list(APPEND CMAKE_PREFIX_PATH $ENV{openDAQ_ROOT}/lib/cmake)
15+
# endif()
16+
find_package(openDAQ 3.20.4 REQUIRED)
17+
message(STATUS "OpenDAQ found: ${openDAQ_LIBRARIES}")

0 commit comments

Comments
 (0)