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

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