#------------------------------------------------------------------- # This file is part of the CMake build system for Scol # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. #------------------------------------------------------------------- ############################################################ # CmakeList file for curl plugin ############################################################ PROJECT(scurl) # define header and source files for the library set (SCURL_HEADER_FILES include/sService.h include/sCurl.h ) if (Scol_STATIC) set (SCURL_HEADER_FILES ${SCURL_HEADER_FILES} include/loadScolScurl.h) endif() set (SCURL_SOURCE_FILES src/sService.cpp src/sCurl.cpp src/scolplugin.cpp ) scol_include_plugin("SCURL" "${PROJECT_SOURCE_DIR}/include" "loadScolScurl.h") # Add directories includes include_directories(include ${CURL_INCLUDE_DIRS}) # Add definition for P4 optimizations, warnings removal. if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES arm*) add_definitions(-DOPTI_P4) endif() if (NOT APPLE) add_definitions(-DUSE_SSLEAY -DUSE_OPENSSL) endif() add_definitions(-D_CRT_SECURE_NO_WARNINGS -DCURL_STATICLIB) add_definitions(-DOPENSSL_API_COMPAT=0x10000000L) # Add windows version if (WIN32) add_definitions(-D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0601) endif() set(SCURL_LIBRARIES ${CURL_LIBRARIES} ${ZLIB_LIBRARY} ${OPENSSL_LIBRARIES} ${Boost_LIBRARIES} ) # setup Scol plugin target add_library(scurl ${Scol_LIB_TYPE} ${SCURL_HEADER_FILES} ${SCURL_SOURCE_FILES} ) add_dependencies(scurl kernel) # set the dll version. #set_target_properties(scurl PROPERTIES VERSION ${Scol_VERSION} SOVERSION ${Scol_VERSION_MAJOR}) target_link_libraries(scurl ${SCURL_LIBRARIES}) if (ANDROID) set(Scol_ANDROID_DEPENDENCIES ${Scol_ANDROID_DEPENDENCIES} scurl CACHE INTERNAL "" FORCE) message(STATUS "[${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}] Scol_ANDROID_DEPENDENCIES: ${Scol_ANDROID_DEPENDENCIES} -- added scurl to android project deps") endif() # install Scol scol_config_plugin(scurl) #install(FILES ${SCURL_HEADER_FILES} DESTINATION include/SCOL/plugins/scurl)