diff options
author | Chris Robinson <[email protected]> | 2010-05-16 08:03:05 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-05-16 08:03:05 -0700 |
commit | 85838c1d57f40724546c5db8375da72f24eaea12 (patch) | |
tree | fc61935f24827b9d6f8a7746c529be4946614e1d /cmake/CheckSharedLibraryExists.cmake | |
parent | 4fbb3ccf661e8f199ba48cabda48b491e2c91fec (diff) |
Define ARGSTACK and CALLSTACK only when needed for testing shared libs
Diffstat (limited to 'cmake/CheckSharedLibraryExists.cmake')
-rw-r--r-- | cmake/CheckSharedLibraryExists.cmake | 7 |
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}) |