|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- PROJECT(openvibe-module-geometry)
-
- SET(PROJECT_VERSION_MAJOR ${OV_GLOBAL_VERSION_MAJOR})
- SET(PROJECT_VERSION_MINOR ${OV_GLOBAL_VERSION_MINOR})
- SET(PROJECT_VERSION_PATCH ${OV_GLOBAL_VERSION_PATCH})
- SET(PROJECT_VERSION ${OV_GLOBAL_VERSION_STRING})
-
- FILE(GLOB_RECURSE SRC_FILES src/*.cpp include/*.hpp include/*.h)
- INCLUDE_DIRECTORIES(include)
-
- # We use static library to allow template functions and stl object in class
- ADD_LIBRARY(${PROJECT_NAME} STATIC ${SRC_FILES})
- SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES
- VERSION ${PROJECT_VERSION}
- SOVERSION ${PROJECT_VERSION_MAJOR}
- FOLDER ${MODULES_FOLDER})
-
- if(UNIX)
- SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-fPIC")
- ENDIF(UNIX)
-
- if(WIN32)
- ADD_DEFINITIONS(/bigobj) # Definition for big obj file in debug mode with visual studio
- ENDIF(WIN32)
-
- ADD_DEFINITIONS(-D_USE_MATH_DEFINES) # Definition for constant math as M_PI
-
-
- # OpenViBE Third Party
- INCLUDE("FindThirdPartyEigen")
- INCLUDE("FindThirdPartyBoost")
-
- # ---------------------------------
- # Target macros
- # Defines target operating system, architecture and compiler
- # ---------------------------------
- SET_BUILD_PLATFORM()
-
- # -----------------------------
- # Install files
- # -----------------------------
- INSTALL(TARGETS ${PROJECT_NAME}
- RUNTIME DESTINATION ${DIST_BINDIR}
- LIBRARY DESTINATION ${DIST_LIBDIR}
- ARCHIVE DESTINATION ${DIST_LIBDIR})
-
- INSTALL(DIRECTORY include/ DESTINATION ${DIST_INCLUDEDIR} FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h")
-
- # ---------------------------------
- # Test applications
- # ---------------------------------
- IF(OV_COMPILE_TESTS)
- ADD_SUBDIRECTORY(test)
- ENDIF()
|