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

3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. PROJECT(openvibe-module-fs)
  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 src/*.h src/*.hpp src/*.inl include/*.h)
  7. INCLUDE_DIRECTORIES(include/fs)
  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 "-DFS_Shared -DFS_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 "-DFS_Static -DFS_Exports")
  21. IF(UNIX)
  22. SET_TARGET_PROPERTIES(${PROJECT_NAME}-static PROPERTIES COMPILE_FLAGS "-fPIC")
  23. ENDIF()
  24. INCLUDE("FindOpenViBECommon")
  25. INCLUDE("FindThirdPartyBoost")
  26. INCLUDE("FindThirdPartyBoost_FileSystem")
  27. # ---------------------------------
  28. # Target macros
  29. # Defines target operating system, architecture and compiler
  30. # ---------------------------------
  31. SET_BUILD_PLATFORM()
  32. # -----------------------------
  33. # Install files
  34. # -----------------------------
  35. INSTALL(TARGETS ${PROJECT_NAME}
  36. RUNTIME DESTINATION ${DIST_BINDIR}
  37. LIBRARY DESTINATION ${DIST_LIBDIR}
  38. ARCHIVE DESTINATION ${DIST_LIBDIR})
  39. INSTALL(TARGETS ${PROJECT_NAME}-static
  40. RUNTIME DESTINATION ${DIST_BINDIR}
  41. LIBRARY DESTINATION ${DIST_LIBDIR}
  42. ARCHIVE DESTINATION ${DIST_LIBDIR})
  43. INSTALL(DIRECTORY include/ DESTINATION ${DIST_INCLUDEDIR} FILES_MATCHING PATTERN "*.h")