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.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. PROJECT(openvibe-module-csv)
  2. SET(PROJECT_VERSION_MAJOR ${OV_GLOBAL_VERSION_MAJOR})
  3. SET(PROJECT_VERSION_MINOR ${OV_GLOBAL_VERSION_MINOR})
  4. SET(PROJECT_VERSION_PATCH ${OV_GLOBAL_VERSION_PATCH})
  5. SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
  6. FILE(GLOB_RECURSE SRC_FILES src/*.cpp include/*.h src/*.hpp)
  7. INCLUDE_DIRECTORIES(include/csv)
  8. INCLUDE("FindSourceRCProperties")
  9. ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRC_FILES})
  10. SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES
  11. VERSION ${PROJECT_VERSION}
  12. SOVERSION ${PROJECT_VERSION_MAJOR}
  13. FOLDER ${MODULES_FOLDER}
  14. COMPILE_FLAGS "-DCSV_Shared -DCSV_Exports")
  15. ADD_LIBRARY(${PROJECT_NAME}-static STATIC ${SRC_FILES})
  16. SET_TARGET_PROPERTIES(${PROJECT_NAME}-static PROPERTIES
  17. VERSION ${PROJECT_VERSION}
  18. SOVERSION ${PROJECT_VERSION_MAJOR}
  19. FOLDER ${MODULES_FOLDER}
  20. COMPILE_FLAGS "-DCSV_Static -DCSV_Exports")
  21. IF(UNIX)
  22. SET_TARGET_PROPERTIES(${PROJECT_NAME}-static PROPERTIES COMPILE_FLAGS "-fPIC")
  23. ENDIF(UNIX)
  24. SET(DYNAMIC_LINK_OPENVIBE_MODULE_FS OFF)
  25. INCLUDE("FindOpenViBECommon")
  26. INCLUDE("FindOpenViBEModuleFS")
  27. INCLUDE("FindThirdPartyBoost")
  28. INCLUDE("FindThirdPartyBoost_FileSystem")
  29. # ---------------------------------
  30. # Target macros
  31. # Defines target operating system, architecture and compiler
  32. # ---------------------------------
  33. SET_BUILD_PLATFORM()
  34. # -----------------------------
  35. # Install files
  36. # -----------------------------
  37. INSTALL(TARGETS ${PROJECT_NAME}
  38. RUNTIME DESTINATION ${DIST_BINDIR}
  39. LIBRARY DESTINATION ${DIST_LIBDIR}
  40. ARCHIVE DESTINATION ${DIST_LIBDIR})
  41. INSTALL(TARGETS ${PROJECT_NAME}-static
  42. RUNTIME DESTINATION ${DIST_BINDIR}
  43. LIBRARY DESTINATION ${DIST_LIBDIR}
  44. ARCHIVE DESTINATION ${DIST_LIBDIR})
  45. INSTALL(DIRECTORY include/ DESTINATION ${DIST_INCLUDEDIR} COMPONENT headers FILES_MATCHING PATTERN "*.h")