Cleaned up the custom definition I added (replaced by CURL_STATICLIB)
This commit is contained in:
parent
4cd950900b
commit
4d396169c8
@ -1,5 +1,5 @@
|
|||||||
# cURL/libcurl CMake script
|
# cURL/libcurl CMake script
|
||||||
# by [PUT YOUR REAL NAME TETEST!] and Sukender (Benoit Neil)
|
# by Tetetest and Sukender (Benoit Neil)
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# The output .so file lacks the soname number which we currently have within the lib/Makefile.am file
|
# The output .so file lacks the soname number which we currently have within the lib/Makefile.am file
|
||||||
@ -141,7 +141,6 @@ MARK_AS_ADVANCED(DISABLED_THREADSAFE)
|
|||||||
OPTION(ENABLE_IPV6 "Define if you want to enable IPv6 support" OFF)
|
OPTION(ENABLE_IPV6 "Define if you want to enable IPv6 support" OFF)
|
||||||
MARK_AS_ADVANCED(ENABLE_IPV6)
|
MARK_AS_ADVANCED(ENABLE_IPV6)
|
||||||
|
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
LIST_SPACES_APPEND_ONCE(CMAKE_C_STANDARD_LIBRARIES wsock32.lib ws2_32.lib) # bufferoverflowu.lib
|
LIST_SPACES_APPEND_ONCE(CMAKE_C_STANDARD_LIBRARIES wsock32.lib ws2_32.lib) # bufferoverflowu.lib
|
||||||
IF(CURL_DISABLE_LDAP)
|
IF(CURL_DISABLE_LDAP)
|
||||||
|
@ -93,10 +93,6 @@ extern "C" {
|
|||||||
|
|
||||||
typedef void CURL;
|
typedef void CURL;
|
||||||
|
|
||||||
#ifdef USES_DIRECT_CURL_UTILITIES
|
|
||||||
#define CURL_EXTERN
|
|
||||||
#else /* USES_DIRECT_CURL_UTILITIES */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Decorate exportable functions for Win32 and Symbian OS DLL linking.
|
* Decorate exportable functions for Win32 and Symbian OS DLL linking.
|
||||||
* This avoids using a .def file for building libcurl.dll.
|
* This avoids using a .def file for building libcurl.dll.
|
||||||
@ -122,7 +118,6 @@ typedef void CURL;
|
|||||||
#define CURL_EXTERN
|
#define CURL_EXTERN
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif /* USES_DIRECT_CURL_UTILITIES */
|
|
||||||
|
|
||||||
#ifndef curl_socket_typedef
|
#ifndef curl_socket_typedef
|
||||||
/* socket typedef */
|
/* socket typedef */
|
||||||
|
@ -50,6 +50,10 @@
|
|||||||
|
|
||||||
/* to make a symbol visible */
|
/* to make a symbol visible */
|
||||||
#cmakedefine CURL_EXTERN_SYMBOL ${CURL_EXTERN_SYMBOL}
|
#cmakedefine CURL_EXTERN_SYMBOL ${CURL_EXTERN_SYMBOL}
|
||||||
|
/* Ensure using CURL_EXTERN_SYMBOL is possible */
|
||||||
|
#ifndef CURL_EXTERN_SYMBOL
|
||||||
|
#define CURL_EXTERN_SYMBOL
|
||||||
|
#endif
|
||||||
|
|
||||||
/* to enable hidden symbols */
|
/* to enable hidden symbols */
|
||||||
#cmakedefine CURL_HIDDEN_SYMBOLS ${CURL_HIDDEN_SYMBOLS}
|
#cmakedefine CURL_HIDDEN_SYMBOLS ${CURL_HIDDEN_SYMBOLS}
|
||||||
|
@ -13,7 +13,11 @@ FUNCTION(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test
|
|||||||
SETUP_CURL_DEPENDENCIES(${TEST_NAME})
|
SETUP_CURL_DEPENDENCIES(${TEST_NAME})
|
||||||
#TARGET_LINK_LIBRARIES( ${TEST_NAME} libcurl )
|
#TARGET_LINK_LIBRARIES( ${TEST_NAME} libcurl )
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES COMPILE_DEFINITIONS USES_DIRECT_CURL_UTILITIES) # ${UPPER_TEST_NAME}
|
# Here we define CURL_STATICLIB if not already done. This is a hacky way to avoid symbols from libcrul to be exported/imported, since we do NOT link against libcurl, but include directly some source files.
|
||||||
|
# Please note this is specific to those tests.
|
||||||
|
IF(NOT CURL_STATICLIB)
|
||||||
|
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES COMPILE_DEFINITIONS CURL_STATICLIB) # ${UPPER_TEST_NAME}
|
||||||
|
ENDIF()
|
||||||
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES PROJECT_LABEL "${TARGET_LABEL_PREFIX}${TEST_NAME}")
|
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES PROJECT_LABEL "${TARGET_LABEL_PREFIX}${TEST_NAME}")
|
||||||
|
|
||||||
# Add the postfix to the executable since it is not added automatically as for modules and shared libraries
|
# Add the postfix to the executable since it is not added automatically as for modules and shared libraries
|
||||||
|
Loading…
x
Reference in New Issue
Block a user