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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. PROJECT(openvibe-module-geometry)
  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 ${OV_GLOBAL_VERSION_STRING})
  6. FILE(GLOB_RECURSE SRC_FILES src/*.cpp include/*.hpp include/*.h)
  7. INCLUDE_DIRECTORIES(include)
  8. # We use static library to allow template functions and stl object in class
  9. ADD_LIBRARY(${PROJECT_NAME} STATIC ${SRC_FILES})
  10. SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES
  11. VERSION ${PROJECT_VERSION}
  12. SOVERSION ${PROJECT_VERSION_MAJOR}
  13. FOLDER ${MODULES_FOLDER})
  14. if(UNIX)
  15. SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-fPIC")
  16. ENDIF(UNIX)
  17. if(WIN32)
  18. ADD_DEFINITIONS(/bigobj) # Definition for big obj file in debug mode with visual studio
  19. ENDIF(WIN32)
  20. ADD_DEFINITIONS(-D_USE_MATH_DEFINES) # Definition for constant math as M_PI
  21. # OpenViBE Third Party
  22. INCLUDE("FindThirdPartyEigen")
  23. INCLUDE("FindThirdPartyBoost")
  24. # ---------------------------------
  25. # Target macros
  26. # Defines target operating system, architecture and compiler
  27. # ---------------------------------
  28. SET_BUILD_PLATFORM()
  29. # -----------------------------
  30. # Install files
  31. # -----------------------------
  32. INSTALL(TARGETS ${PROJECT_NAME}
  33. RUNTIME DESTINATION ${DIST_BINDIR}
  34. LIBRARY DESTINATION ${DIST_LIBDIR}
  35. ARCHIVE DESTINATION ${DIST_LIBDIR})
  36. INSTALL(DIRECTORY include/ DESTINATION ${DIST_INCLUDEDIR} FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h")
  37. # ---------------------------------
  38. # Test applications
  39. # ---------------------------------
  40. IF(OV_COMPILE_TESTS)
  41. ADD_SUBDIRECTORY(test)
  42. ENDIF()