git subrepo clone (merge) --branch=v3.6.1 https://github.com/nats-io/nats.c.git deps/nats.c
subrepo: subdir: "deps/nats.c" merged: "66cec7f" upstream: origin: "https://github.com/nats-io/nats.c.git" branch: "v3.6.1" commit: "66cec7f" git-subrepo: version: "0.4.6" commit: "b8b46501e"
This commit is contained in:
29
deps/nats.c/examples/stan/CMakeLists.txt
vendored
Normal file
29
deps/nats.c/examples/stan/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
if(NOT NATS_BUILD_EXAMPLES)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# We need this directory to build the examples
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/examples/stan)
|
||||
|
||||
# Get all the .c files in the examples directory
|
||||
file(GLOB EXAMPLES_SOURCES RELATIVE ${PROJECT_SOURCE_DIR}/examples/stan *.c)
|
||||
|
||||
# For each file...
|
||||
foreach(examples_src ${EXAMPLES_SOURCES})
|
||||
|
||||
# Remove the suffix so that it becomes the executable name
|
||||
string(REPLACE ".c" "" examplename ${examples_src})
|
||||
set(exampleexe "stan-${examplename}")
|
||||
|
||||
# Build the executable
|
||||
add_executable(${exampleexe} ${PROJECT_SOURCE_DIR}/examples/stan/${examples_src})
|
||||
|
||||
# Link
|
||||
if(NATS_BUILD_STATIC_EXAMPLES)
|
||||
target_link_libraries(${exampleexe} nats_static ${NATS_EXTRA_LIB})
|
||||
else()
|
||||
target_link_libraries(${exampleexe} nats ${NATS_EXTRA_LIB})
|
||||
endif()
|
||||
|
||||
endforeach()
|
Reference in New Issue
Block a user