123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- # Author:
- # Sven Czarnian <devel@svcz.de>
- # License:
- # GPLv3
- # Brief:
- # Creates the 3rd-party import targets
- # include the external project library
- INCLUDE(ExternalProject)
- # define the import target of libcurl
- ADD_LIBRARY(libcurl STATIC IMPORTED)
- IF (MSVC)
- SET_TARGET_PROPERTIES(libcurl PROPERTIES
- IMPORTED_LOCATION_DEBUG "${CMAKE_SOURCE_DIR}/external/lib/libcurl-d.lib"
- IMPORTED_LOCATION_RELEASE "${CMAKE_SOURCE_DIR}/external/lib/libcurl.lib"
- )
- TARGET_LINK_LIBRARIES(libcurl INTERFACE Ws2_32 Iphlpapi Crypt32)
- TARGET_INCLUDE_DIRECTORIES(libcurl INTERFACE "${CMAKE_SOURCE_DIR}/external/include")
- ELSE ()
- MESSAGE(FATAL_ERROR "Unsupported compiler")
- ENDIF ()
- # define the import target of GeographicLib
- ADD_LIBRARY(GeographicLib STATIC IMPORTED)
- IF (MSVC)
- SET_TARGET_PROPERTIES(GeographicLib PROPERTIES
- IMPORTED_LOCATION_DEBUG "${CMAKE_SOURCE_DIR}/external/lib/Geographic_d.lib"
- IMPORTED_LOCATION_RELEASE "${CMAKE_SOURCE_DIR}/external/lib/Geographic.lib"
- )
- TARGET_INCLUDE_DIRECTORIES(GeographicLib INTERFACE "${CMAKE_SOURCE_DIR}/external/include")
- ELSE ()
- MESSAGE(FATAL_ERROR "Unsupported compiler")
- ENDIF ()
- # define the import target of libsodium
- ADD_LIBRARY(libsodium STATIC IMPORTED)
- IF (MSVC)
- SET_TARGET_PROPERTIES(libsodium PROPERTIES
- IMPORTED_LOCATION_DEBUG "${CMAKE_SOURCE_DIR}/external/lib/libsodiumd.lib"
- IMPORTED_LOCATION_RELEASE "${CMAKE_SOURCE_DIR}/external/lib/libsodium.lib"
- )
- TARGET_LINK_LIBRARIES(libsodium INTERFACE Ws2_32 Iphlpapi)
- TARGET_INCLUDE_DIRECTORIES(libsodium INTERFACE "${CMAKE_SOURCE_DIR}/external/include")
- ELSE ()
- MESSAGE(FATAL_ERROR "Unsupported compiler")
- ENDIF ()
- # define the import target of libcurl
- ADD_LIBRARY(jsoncpp STATIC IMPORTED)
- IF (MSVC)
- SET_TARGET_PROPERTIES(jsoncpp PROPERTIES
- IMPORTED_LOCATION_DEBUG "${CMAKE_SOURCE_DIR}/external/lib/jsoncpp_d.lib"
- IMPORTED_LOCATION_RELEASE "${CMAKE_SOURCE_DIR}/external/lib/jsoncpp.lib"
- )
- TARGET_INCLUDE_DIRECTORIES(jsoncpp INTERFACE "${CMAKE_SOURCE_DIR}/external/include")
- ELSE ()
- MESSAGE(FATAL_ERROR "Unsupported compiler")
- ENDIF ()
- # define the import target of libzmq
- ADD_LIBRARY(libzmq STATIC IMPORTED)
- ADD_DEPENDENCIES(libzmq libsodium)
- IF (MSVC)
- SET_TARGET_PROPERTIES(libzmq PROPERTIES
- IMPORTED_LOCATION_DEBUG "${CMAKE_SOURCE_DIR}/external/lib/libzmqd.lib"
- IMPORTED_LOCATION_RELEASE "${CMAKE_SOURCE_DIR}/external/lib/libzmq.lib"
- )
- TARGET_INCLUDE_DIRECTORIES(libzmq INTERFACE "${CMAKE_SOURCE_DIR}/external/include")
- TARGET_LINK_LIBRARIES(libzmq INTERFACE libsodium)
- TARGET_COMPILE_OPTIONS(libzmq INTERFACE /DZMQ_STATIC)
- ELSE ()
- MESSAGE(FATAL_ERROR "Unsupported compiler")
- ENDIF ()
- # define the import target of cppzmq
- ADD_LIBRARY(cppzmq INTERFACE)
- TARGET_INCLUDE_DIRECTORIES(cppzmq INTERFACE "${CMAKE_SOURCE_DIR}/external/include")
- TARGET_LINK_LIBRARIES(cppzmq INTERFACE libzmq)
- ADD_DEPENDENCIES(cppzmq libzmq)
- # define the import target of GSL
- ADD_LIBRARY(GSL INTERFACE)
- TARGET_INCLUDE_DIRECTORIES(GSL INTERFACE "${CMAKE_SOURCE_DIR}/external/include")
- # define the import target of Eigen
- ADD_LIBRARY(Eigen INTERFACE)
- TARGET_INCLUDE_DIRECTORIES(Eigen INTERFACE "${CMAKE_SOURCE_DIR}/external/include/eigen3")
- # define the import target of protobuf
- ADD_LIBRARY(protobuf STATIC IMPORTED)
- IF (MSVC)
- SET_TARGET_PROPERTIES(protobuf PROPERTIES
- IMPORTED_LOCATION_DEBUG "${CMAKE_SOURCE_DIR}/external/lib/libprotobufd.lib"
- IMPORTED_LOCATION_RELEASE "${CMAKE_SOURCE_DIR}/external/lib/libprotobuf.lib"
- )
- TARGET_INCLUDE_DIRECTORIES(protobuf INTERFACE "${CMAKE_SOURCE_DIR}/external/include")
- ELSE ()
- MESSAGE(FATAL_ERROR "Unsupported compiler")
- ENDIF ()
|