Skip to content
Snippets Groups Projects
Commit 6642cf2d authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

move getnext from examples

parent 8d4c34e1
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,9 @@ if(BUILD_EXAMPLES)
endif()
if(BUILD_EXAMPLES OR INSTALL_EXAMPLES)
add_subdirectory(producer)
add_subdirectory(consumer)
endif()
if(BUILD_EXAMPLES OR INSTALL_EXAMPLES OR BUILD_INTEGRATION_TESTS)
add_subdirectory(producer)
endif()
\ No newline at end of file
find_package(Threads)
add_subdirectory(getnext)
if(BUILD_EXAMPLES AND BUILD_PYTHON)
add_subdirectory(getnext_python)
endif()
......
cmake_minimum_required(VERSION 2.8)
project(@TARGET_NAME@)
set(CMAKE_CXX_STANDARD 11)
IF(CMAKE_C_COMPILER_ID STREQUAL "GNU")
SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
ENDIF()
find_package (Threads)
if (NOT "$ENV{LIBCURL_DIR}" STREQUAL "")
if (NOT LIBCURL_DIR)
set(LIBCURL_DIR $ENV{LIBCURL_DIR})
endif()
endif ()
set (CMAKE_PREFIX_PATH "${LIBCURL_DIR}")
find_package (CURL REQUIRED)
message (STATUS "Found cURL libraries: ${CURL_LIBRARIES}")
message (STATUS "cURL include: ${CURL_INCLUDE_DIRS}")
set(TARGET_NAME ${CMAKE_PROJECT_NAME})
set(SOURCE_FILES @SOURCE_FILES@)
link_directories(@CMAKE_INSTALL_PREFIX@/lib)
add_executable(${TARGET_NAME} ${SOURCE_FILES})
target_include_directories(${TARGET_NAME} PUBLIC @CMAKE_INSTALL_PREFIX@/include)
target_link_libraries(${TARGET_NAME} asapo-consumer dl ${CURL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
......@@ -3,9 +3,10 @@ find_package(Threads)
add_subdirectory(common_scripts)
add_subdirectory(support/getnext)
add_subdirectory(common/cpp)
add_subdirectory(system_io)
add_subdirectory(json_parser)
......
......@@ -13,13 +13,4 @@ set_target_properties(${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
add_script_test("${TARGET_NAME}" "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}")
endif()
set (dir share/asapo/examples/consumer/${TARGET_NAME})
install(FILES ${SOURCE_FILES} DESTINATION "${dir}")
configure_file(CMakeLists_separate.in CMakeLists_separate.txt @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists_separate.txt DESTINATION "${dir}" RENAME CMakeLists.txt)
configure_file(Makefile.in Makefile_LINUX @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Makefile_LINUX DESTINATION "${dir}")
endif()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment