12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- PROJECT(openvibe-module-date)
-
- 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 ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
-
- SET(SRC_FILES
- include/date/defines.h
- include/date/DateParser.h
- src/DateParser.cpp
- )
-
- IF(WIN32)
- LIST(APPEND SRC_FILES
- "include/date/WindowsDateParser.h"
- "src/WindowsDateParser.cpp"
- )
- ENDIF()
-
- INCLUDE_DIRECTORIES(include/date)
- INCLUDE("FindSourceRCProperties")
-
- ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRC_FILES})
- SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES
- VERSION ${PROJECT_VERSION}
- SOVERSION ${PROJECT_VERSION_MAJOR}
- FOLDER ${MODULES_FOLDER}
- COMPILE_FLAGS "-DDate_Shared -DDate_Exports")
-
- ADD_LIBRARY(${PROJECT_NAME}-static STATIC ${SRC_FILES})
- SET_TARGET_PROPERTIES(${PROJECT_NAME}-static PROPERTIES
- VERSION ${PROJECT_VERSION}
- SOVERSION ${PROJECT_VERSION_MAJOR}
- FOLDER ${MODULES_FOLDER}
- COMPILE_FLAGS "-DDate_Static -DDate_Exports")
-
- IF(UNIX)
- SET_TARGET_PROPERTIES(${PROJECT_NAME}-static PROPERTIES COMPILE_FLAGS "-fPIC")
- ENDIF(UNIX)
-
- INCLUDE("FindOpenViBECommon")
- INCLUDE("FindThirdPartyBoost")
- INCLUDE("FindThirdPartyExpat")
-
- # ---------------------------------
- # 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(TARGETS ${PROJECT_NAME}-static
- RUNTIME DESTINATION ${DIST_BINDIR}
- LIBRARY DESTINATION ${DIST_LIBDIR}
- ARCHIVE DESTINATION ${DIST_LIBDIR})
-
- INSTALL(DIRECTORY include/ DESTINATION ${DIST_INCLUDEDIR} FILES_MATCHING PATTERN "*.h" PATTERN)
|