CMakeLists.txt 1.43 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
project (project_embb_tutorials)

file(GLOB_RECURSE EXAMPLES_SOURCES "*.cc" "*.h")

include_directories(  
  ${CMAKE_CURRENT_SOURCE_DIR}/
  ${CMAKE_CURRENT_BINARY_DIR}/
  ${CMAKE_CURRENT_SOURCE_DIR}/../../base_c/include
  ${CMAKE_CURRENT_BINARY_DIR}/../../base_c/include
  ${CMAKE_CURRENT_SOURCE_DIR}/../../base_cpp/include
  ${CMAKE_CURRENT_BINARY_DIR}/../../base_cpp/include
  ${CMAKE_CURRENT_SOURCE_DIR}/../../mtapi_c/include
13 14 15
  ${CMAKE_CURRENT_SOURCE_DIR}/../../mtapi_c/src
  ${CMAKE_CURRENT_SOURCE_DIR}/../../mtapi_network_c/include
  ${CMAKE_CURRENT_SOURCE_DIR}/../../mtapi_opencl_c/include
16
  ${CMAKE_CURRENT_SOURCE_DIR}/../../mtapi_cpp/include
17 18
  ${CMAKE_CURRENT_SOURCE_DIR}/../../tasks_cpp/include
  ${CMAKE_CURRENT_BINARY_DIR}/../../tasks_cpp/include
19 20 21 22 23 24 25
  ${CMAKE_CURRENT_SOURCE_DIR}/../../containers_cpp/include
  ${CMAKE_CURRENT_SOURCE_DIR}/../../algorithms_cpp/include
  ${CMAKE_CURRENT_SOURCE_DIR}/../../dataflow_cpp/include
  )

if(CMAKE_COMPILER_IS_GNUCXX)
  set(CMAKE_CXX_FLAGS "-std=c++11")
26
  set (EXTRA_LIBS dl)
27 28
endif()

29
IF(MSVC)
30
  set (EXTRA_LIBS ws2_32)
31 32
ENDIF()

33
add_executable(examples ${EXAMPLES_SOURCES})
34
target_link_libraries(examples embb_dataflow_cpp embb_algorithms_cpp embb_tasks_cpp embb_mtapi_cpp
35 36
                      embb_mtapi_network_c embb_mtapi_opencl_c embb_mtapi_c
                      embb_base_cpp embb_base_c embb_containers_cpp
37
                      ${EXTRA_LIBS} ${compiler_libs})
38
CopyBin(BIN examples DEST ${local_install_dir})