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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. PROJECT(openvibe-module-ebml)
  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)
  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 "-DEBML_Shared -DEBML_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 "-DEBML_Static -DEBML_Exports")
  21. IF(UNIX)
  22. SET_TARGET_PROPERTIES(${PROJECT_NAME}-static PROPERTIES COMPILE_FLAGS "-fPIC")
  23. ENDIF(UNIX)
  24. INCLUDE("FindOpenViBECommon")
  25. # ---------------------------------
  26. # Target macros
  27. # Defines target operating system, architecture and compiler
  28. # ---------------------------------
  29. SET_BUILD_PLATFORM()
  30. # -----------------------------
  31. # Install files
  32. # -----------------------------
  33. INSTALL(TARGETS ${PROJECT_NAME}
  34. RUNTIME DESTINATION ${DIST_BINDIR}
  35. LIBRARY DESTINATION ${DIST_LIBDIR}
  36. ARCHIVE DESTINATION ${DIST_LIBDIR})
  37. INSTALL(TARGETS ${PROJECT_NAME}-static
  38. RUNTIME DESTINATION ${DIST_BINDIR}
  39. LIBRARY DESTINATION ${DIST_LIBDIR}
  40. ARCHIVE DESTINATION ${DIST_LIBDIR})
  41. INSTALL(DIRECTORY include/ DESTINATION ${DIST_INCLUDEDIR} FILES_MATCHING PATTERN "*.h")