aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/CheckSharedLibraryExists.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/CheckSharedLibraryExists.cmake b/cmake/CheckSharedLibraryExists.cmake
index 0dbb5b90..0069d892 100644
--- a/cmake/CheckSharedLibraryExists.cmake
+++ b/cmake/CheckSharedLibraryExists.cmake
@@ -28,9 +28,12 @@ MACRO(CHECK_SHARED_LIBRARY_EXISTS LIBRARY FUNCTION ARGCOUNT LOCATION VARIABLE)
SET(CALLSTACK "${CALLSTACK},NULL")
MATH(EXPR CURARG "${CURARG} + 1")
ENDWHILE(${ARGCOUNT} GREATER ${CURARG})
+ SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
+ "-D_WIN32 -DARGSTACK=\"${ARGSTACK}\" -DCALLSTACK=\"${CALLSTACK}\" ${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION}")
+ ELSE(${ARGCOUNT} GREATER 0)
+ SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
+ "-D_WIN32 ${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION}")
ENDIF(${ARGCOUNT} GREATER 0)
- SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
- "-D_WIN32 -DARGSTACK=\"${ARGSTACK}\" -DCALLSTACK=\"${CALLSTACK}\" ${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION}")
ENDIF(WIN32)
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY}")
SET(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})