123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- # ---------------------------------
- # Finds third party boost chrono
- # Adds a def that its present
- # ---------------------------------
-
- GET_PROPERTY(OV_PRINTED GLOBAL PROPERTY OV_TRIED_ThirdPartyBoost_Chrono)
-
- IF(WIN32)
- FIND_PATH(PATH_BOOST_CHRONO "include/boost/chrono.hpp" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES boost NO_DEFAULT_PATH)
- IF(PATH_BOOST_CHRONO)
- OV_PRINT(OV_PRINTED " Found boost chrono includes...")
- OV_LINK_BOOST_LIB("chrono" ${OV_WIN32_BOOST_VERSION} )
- IF(LIB_BOOST_PATH AND LIB_BOOST_DEBUG_PATH)
- ADD_DEFINITIONS(-DTARGET_HAS_Boost_Chrono)
- ENDIF(LIB_BOOST_PATH AND LIB_BOOST_DEBUG_PATH)
- ENDIF(PATH_BOOST_CHRONO)
- ENDIF(WIN32)
-
- IF(UNIX)
-
- FIND_PATH(PATH_BOOST_CHRONO "include/boost/chrono.hpp" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES boost NO_DEFAULT_PATH)
- FIND_PATH(PATH_BOOST_CHRONO "include/boost/chrono.hpp" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES boost)
-
- IF(PATH_BOOST_CHRONO)
- OV_PRINT(OV_PRINTED " Found boost chrono includes...")
-
- FIND_LIBRARY(LIB_Boost_Chrono NAMES "boost_chrono" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib NO_DEFAULT_PATH)
- FIND_LIBRARY(LIB_Boost_Chrono NAMES "boost_chrono" PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lib)
- IF(LIB_Boost_Chrono)
- OV_PRINT(OV_PRINTED " [ OK ] lib ${LIB_Boost_Chrono}")
- ADD_DEFINITIONS(-DTARGET_HAS_Boost_Chrono)
- TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_Boost_Chrono})
- ELSE(LIB_Boost_Chrono)
- OV_PRINT(OV_PRINTED " [FAILED] lib boost_chrono")
- ENDIF(LIB_Boost_Chrono)
-
- # Fedora / Ubuntu
- FIND_LIBRARY(LIB_STANDARD_MODULE_RT rt)
- IF(LIB_STANDARD_MODULE_RT)
- OV_PRINT(OV_PRINTED " Found rt...")
- TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_STANDARD_MODULE_RT})
- ELSE(LIB_STANDARD_MODULE_RT)
- OV_PRINT(OV_PRINTED " FAILED to find rt...")
- ENDIF(LIB_STANDARD_MODULE_RT)
-
- ELSE(PATH_BOOST_CHRONO)
- OV_PRINT(OV_PRINTED " FAILED to find boost chrono includes...")
- ENDIF(PATH_BOOST_CHRONO)
-
- ENDIF(UNIX)
-
-
- SET_PROPERTY(GLOBAL PROPERTY OV_TRIED_ThirdPartyBoost_Chrono "Yes")
|