File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FIND_PACKAGE (open62541 REQUIRED )
2+
13ADD_EXECUTABLE (open62541_client client.cpp )
24TARGET_LINK_LIBRARIES (open62541_client PRIVATE open62541::open62541 )
35
Original file line number Diff line number Diff line change 1- INCLUDE (FetchContent )
2-
3- FETCHCONTENT_DECLARE (
4- open62541pp
5- GIT_REPOSITORY https://github.com/open62541pp/open62541pp.git
6- GIT_TAG v0.15.0
7- )
8- FETCHCONTENT_MAKEAVAILABLE (open62541pp)
1+ FIND_PACKAGE (open62541pp QUIET )
2+ IF (NOT open62541pp_FOUND)
3+ MESSAGE ("open62541pp could not be located in the CMake module search path. Downloading it from Git and building it locally" )
4+ INCLUDE (FetchContent )
5+ FETCHCONTENT_DECLARE (
6+ open62541pp
7+ GIT_REPOSITORY https://github.com/open62541pp/open62541pp.git
8+ GIT_TAG v0.13.0
9+ )
10+ FETCHCONTENT_MAKEAVAILABLE (open62541pp)
11+ ENDIF ()
912
1013ADD_EXECUTABLE (open62541pp_client client.cpp )
1114TARGET_LINK_LIBRARIES (open62541pp_client PRIVATE open62541pp::open62541pp )
12- TARGET_INCLUDE_DIRECTORIES (open62541pp_client PUBLIC ${open62541pp_SOURCE_DIR} )
1315
1416ADD_EXECUTABLE (open62541pp_server server.cpp )
1517TARGET_LINK_LIBRARIES (open62541pp_server PRIVATE open62541pp::open62541pp )
16- TARGET_INCLUDE_DIRECTORIES (open62541pp_server PUBLIC ${open62541pp_SOURCE_DIR} )
You can’t perform that action at this time.
0 commit comments