Last active
May 26, 2016 19:57
-
-
Save OXPHOS/b7d9d31cd3841605df53effeb528c8e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GetCompilers() | |
include(ExternalProject) | |
ExternalProject_Add( | |
Cereal | |
PREFIX ${CMAKE_SOURCE_DIR}/Cereal | |
DOWNLOAD_DIR ${THIRD_PARTY_DIR}/Cereal | |
URL https://github.com/USCiLab/cereal/archive/v1.1.2.tar.gz | |
URL_MD5 34d4ad174acbff005c36d4d10e48cbb9 | |
) | |
SET(CEREAL_INCLUDE_DIRS ${THIRD_PARTY_DIR}/include) | |
LIST(APPEND SHOGUN_DEPENDS Cereal) | |
UNSET(C_COMPILER) | |
UNSET(CXX_COMPILER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cereal Serialization Library | |
FIND_PACKAGE(Cereal) | |
IF(NOT CEREAL_FOUND) | |
include(external/Cereal) | |
LIST(APPEND INCLUDES ${CEREAL_INCLUDE_DIR}) | |
ELSE() | |
LIST(APPEND INCLUDES ${CEREAL_INCLUDE_DIR}) | |
ENDIF() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# - Try to find Cereal lib | |
# | |
# This sets the following variables: | |
# CEREAL_FOUND - True if Cereal was found. | |
# CEREAL_INCLUDE_DIRS - Directories containing the Cereal include files. | |
find_path(CEREAL_INCLUDE_DIRS cereal | |
HINTS "$ENV{CMAKE_SOURCE_DIR}/include" "/usr/include" "$ENV{CMAKE_BINARY_DIR}/cereal/include") | |
set(CEREAL_INCLUDE_DIRS ${CEREAL_INCLUDE_DIRS}) | |
include(FindPackageHandleStandardArgs) | |
find_package_handle_standard_args(Cereal DEFAULT_MSG CEREAL_INCLUDE_DIRS) | |
mark_as_advanced(CEREAL_INCLUDE_DIRS) | |
if(CEREAL_FOUND) | |
MESSAGE(STATUS "Found Cereal: ${CEREAL_INCLUDE_DIRS}") | |
endif(CEREAL_FOUND) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment