Added tests (exes) targets, refactor a few things.
PS: Once again, sorry if the added files have executable perms on Linux.
This commit is contained in:
@@ -750,8 +750,33 @@ IF(MSVC)
|
||||
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
ENDIF(MSVC)
|
||||
|
||||
# Sets up the dependencies (zlib, OpenSSL, etc.) of a cURL subproject according to options.
|
||||
# TODO This is far to be complete!
|
||||
FUNCTION(SETUP_CURL_DEPENDENCIES TARGET_NAME)
|
||||
IF(CURL_ZLIB AND ZLIB_FOUND)
|
||||
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
||||
ENDIF()
|
||||
IF(CURL_ZLIB AND ZLIB_FOUND)
|
||||
TARGET_LINK_LIBRARIES(${TARGET_NAME} ${ZLIB_LIBRARIES})
|
||||
#ADD_DEFINITIONS( -DHAVE_ZLIB_H -DHAVE_ZLIB -DHAVE_LIBZ )
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_USE_OPENSSL AND OPENSSL_FOUND)
|
||||
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
|
||||
ENDIF()
|
||||
IF(CURL_SSL AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
|
||||
TARGET_LINK_LIBRARIES(${TARGET_NAME} ${OPENSSL_LIBRARIES})
|
||||
#ADD_DEFINITIONS( -DUSE_SSLEAY )
|
||||
ENDIF()
|
||||
ENDFUNCTION()
|
||||
|
||||
ADD_SUBDIRECTORY(lib)
|
||||
ADD_SUBDIRECTORY(src)
|
||||
IF(BUILD_CURL_EXE)
|
||||
ADD_SUBDIRECTORY(src)
|
||||
ENDIF()
|
||||
IF(BUILD_CURL_TESTS)
|
||||
ADD_SUBDIRECTORY(tests)
|
||||
ENDIF()
|
||||
|
||||
# This needs to be run very last so other parts of the scripts can take advantage of this.
|
||||
IF(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
|
||||
|
||||
Reference in New Issue
Block a user