You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMakeLists.txt 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. PROJECT(openvibe-module-communication)
  2. INCLUDE_DIRECTORIES("include/communication/")
  3. FILE(GLOB_RECURSE SRC_FILES src/*.cpp src/*.h src/*.hpp include/*.h include/*.hpp)
  4. ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRC_FILES})
  5. SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES
  6. VERSION ${PROJECT_VERSION}
  7. SOVERSION ${PROJECT_VERSION_MAJOR}
  8. FOLDER ${MODULES_FOLDER}
  9. COMPILE_FLAGS "-DCommunication_Shared -DCommunication_Exports")
  10. ADD_LIBRARY(${PROJECT_NAME}-static STATIC ${SRC_FILES})
  11. SET_TARGET_PROPERTIES(${PROJECT_NAME}-static PROPERTIES
  12. VERSION ${PROJECT_VERSION}
  13. SOVERSION ${PROJECT_VERSION_MAJOR}
  14. FOLDER ${MODULES_FOLDER}
  15. COMPILE_FLAGS "-DCommunication_Static -DCommunication_Exports")
  16. IF(UNIX)
  17. SET_TARGET_PROPERTIES(${PROJECT_NAME}-static PROPERTIES COMPILE_FLAGS "-fPIC")
  18. ENDIF(UNIX)
  19. INCLUDE("FindOpenViBECommon")
  20. INCLUDE("FindOpenViBEModuleSocket")
  21. SET_BUILD_PLATFORM()
  22. # -----------------------------
  23. # Install files
  24. # -----------------------------
  25. INSTALL(TARGETS ${PROJECT_NAME}
  26. RUNTIME DESTINATION ${DIST_BINDIR}
  27. LIBRARY DESTINATION ${DIST_LIBDIR}
  28. ARCHIVE DESTINATION ${DIST_LIBDIR})
  29. INSTALL(TARGETS ${PROJECT_NAME}-static
  30. RUNTIME DESTINATION ${DIST_BINDIR}
  31. LIBRARY DESTINATION ${DIST_LIBDIR}
  32. ARCHIVE DESTINATION ${DIST_LIBDIR})
  33. INSTALL(DIRECTORY include/ DESTINATION ${DIST_INCLUDEDIR})
  34. # Link the socket library to the static version of lib-communication
  35. SET(PROJECT_NAME ${PROJECT_NAME}-static)
  36. SET(DYNAMIC_LINK_OPENVIBE_SDK false)
  37. INCLUDE("FindOpenViBEModuleSocket")
  38. #add_subdirectory(test)