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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. PROJECT(openvibe-module-date)
  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. SET(SRC_FILES
  7. include/date/defines.h
  8. include/date/DateParser.h
  9. src/DateParser.cpp
  10. )
  11. IF(WIN32)
  12. LIST(APPEND SRC_FILES
  13. "include/date/WindowsDateParser.h"
  14. "src/WindowsDateParser.cpp"
  15. )
  16. ENDIF()
  17. INCLUDE_DIRECTORIES(include/date)
  18. INCLUDE("FindSourceRCProperties")
  19. ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRC_FILES})
  20. SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES
  21. VERSION ${PROJECT_VERSION}
  22. SOVERSION ${PROJECT_VERSION_MAJOR}
  23. FOLDER ${MODULES_FOLDER}
  24. COMPILE_FLAGS "-DDate_Shared -DDate_Exports")
  25. ADD_LIBRARY(${PROJECT_NAME}-static STATIC ${SRC_FILES})
  26. SET_TARGET_PROPERTIES(${PROJECT_NAME}-static PROPERTIES
  27. VERSION ${PROJECT_VERSION}
  28. SOVERSION ${PROJECT_VERSION_MAJOR}
  29. FOLDER ${MODULES_FOLDER}
  30. COMPILE_FLAGS "-DDate_Static -DDate_Exports")
  31. IF(UNIX)
  32. SET_TARGET_PROPERTIES(${PROJECT_NAME}-static PROPERTIES COMPILE_FLAGS "-fPIC")
  33. ENDIF(UNIX)
  34. INCLUDE("FindOpenViBECommon")
  35. INCLUDE("FindThirdPartyBoost")
  36. INCLUDE("FindThirdPartyExpat")
  37. # ---------------------------------
  38. # Target macros
  39. # Defines target operating system, architecture and compiler
  40. # ---------------------------------
  41. SET_BUILD_PLATFORM()
  42. # -----------------------------
  43. # Install files
  44. # -----------------------------
  45. INSTALL(TARGETS ${PROJECT_NAME}
  46. RUNTIME DESTINATION ${DIST_BINDIR}
  47. LIBRARY DESTINATION ${DIST_LIBDIR}
  48. ARCHIVE DESTINATION ${DIST_LIBDIR})
  49. INSTALL(TARGETS ${PROJECT_NAME}-static
  50. RUNTIME DESTINATION ${DIST_BINDIR}
  51. LIBRARY DESTINATION ${DIST_LIBDIR}
  52. ARCHIVE DESTINATION ${DIST_LIBDIR})
  53. INSTALL(DIRECTORY include/ DESTINATION ${DIST_INCLUDEDIR} FILES_MATCHING PATTERN "*.h" PATTERN)