rendered paste bodyIndex: ConfigureChecks.cmake
===================================================================
--- ConfigureChecks.cmake (revision 748426)
+++ ConfigureChecks.cmake (working copy)
@@ -42,68 +42,81 @@
if ( USABLE_ASSUAN_FOUND )
# check if assuan has assuan_fd_t
- check_cxx_source_compiles("
- #include <assuan.h>
- int main() {
- assuan_fd_t fd = ASSUAN_INVALID_FD;
- return fd ? 1 : 0 ;
- }
- "
- HAVE_ASSUAN_FD_T )
+ set(CMAKE_REQUIRED_LIBRARIES_tmp ${CMAKE_REQUIRED_LIBRARIES}) #push
+ set(CMAKE_REQUIRED_INCLUDES_tmp ${CMAKE_REQUIRED_INCLUDES}) #push
- if ( WIN32 AND NOT HAVE_ASSUAN_FD_T )
- set( USABLE_ASSUAN_FOUND false )
- endif ( WIN32 AND NOT HAVE_ASSUAN_FD_T )
+ set(CMAKE_REQUIRED_LIBRARIES ${_gpg_error_library} ${ASSUAN_VANILLA_LIBRARIES})
+ set(CMAKE_REQUIRED_INCLUDES ${ASSUAN_INCLUDES})
+ if(MINGW)
+ set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN32_INCLUDE_DIR}/mingw)
+ elseif(MSVC)
+ set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN32_INCLUDE_DIR}/msvc)
+ endif(MINGW)
+ check_cxx_source_compiles("
+ #include <assuan.h>
+ int main() {
+ assuan_fd_t fd = ASSUAN_INVALID_FD;
+ return fd ? 1 : 0 ;
+ }
+ "
+ HAVE_ASSUAN_FD_T )
- # check if assuan has assuan_inquire_ext, old style
- check_function_exists( "assuan_inquire_ext" HAVE_ASSUAN_INQUIRE_EXT )
+ if ( WIN32 AND NOT HAVE_ASSUAN_FD_T )
+ set( USABLE_ASSUAN_FOUND false )
+ endif ( WIN32 AND NOT HAVE_ASSUAN_FD_T )
- if ( NOT HAVE_ASSUAN_INQUIRE_EXT )
- set( USABLE_ASSUAN_FOUND false )
- endif( NOT HAVE_ASSUAN_INQUIRE_EXT )
+ # check if assuan has assuan_inquire_ext, old style
+ check_function_exists( "assuan_inquire_ext" HAVE_ASSUAN_INQUIRE_EXT )
- # check if assuan has new-style assuan_inquire_ext:
- check_cxx_source_compiles("
- #include <assuan.h>
- static int handler( void *, int, unsigned char*, size_t ) { return 0; }
- int main() {
- assuan_context_t ctx = 0;
- const size_t maxSize = 0U;
- assuan_error_t err = assuan_inquire_ext( ctx, \"FOO\", maxSize, handler, (void*)0 );
- return err ? 1 : 0 ;
- }
- "
- HAVE_NEW_STYLE_ASSUAN_INQUIRE_EXT )
+ if ( NOT HAVE_ASSUAN_INQUIRE_EXT )
+ set( USABLE_ASSUAN_FOUND false )
+ endif( NOT HAVE_ASSUAN_INQUIRE_EXT )
- # check if gpg-error already has GPG_ERR_SOURCE_KLEO
- check_cxx_source_compiles("
- #include <gpg-error.h>
- static gpg_err_source_t src = GPG_ERR_SOURCE_KLEO;
- int main() { return 0; }
- "
- HAVE_GPG_ERR_SOURCE_KLEO )
+ # check if assuan has new-style assuan_inquire_ext:
+ check_cxx_source_compiles("
+ #include <assuan.h>
+ static int handler( void *, int, unsigned char*, size_t ) { return 0; }
+ int main() {
+ assuan_context_t ctx = 0;
+ const size_t maxSize = 0U;
+ assuan_error_t err = assuan_inquire_ext( ctx, \"FOO\", maxSize, handler, (void*)0 );
+ return err ? 1 : 0 ;
+ }
+ "
+ HAVE_NEW_STYLE_ASSUAN_INQUIRE_EXT )
- # check if assuan has assuan_sock_get_nonce (via assuan_sock_nonce_t)
- # function_exists runs into linking errors - libassuan is static,
- # and assuan_sock_get_nonce drags in stuff that needs linking
- # against winsock2.
- check_cxx_source_compiles("
- #include <assuan.h>
- static assuan_sock_nonce_t nonce;
- int main() { return 0; }
- "
- HAVE_ASSUAN_SOCK_GET_NONCE )
+ # check if gpg-error already has GPG_ERR_SOURCE_KLEO
+ check_cxx_source_compiles("
+ #include <gpg-error.h>
+ static gpg_err_source_t src = GPG_ERR_SOURCE_KLEO;
+ int main() { return 0; }
+ "
+ HAVE_GPG_ERR_SOURCE_KLEO )
- if ( WIN32 AND NOT HAVE_ASSUAN_SOCK_GET_NONCE )
- set( USABLE_ASSUAN_FOUND false )
- endif ( WIN32 AND NOT HAVE_ASSUAN_SOCK_GET_NONCE )
+ # check if assuan has assuan_sock_get_nonce (via assuan_sock_nonce_t)
+ # function_exists runs into linking errors - libassuan is static,
+ # and assuan_sock_get_nonce drags in stuff that needs linking
+ # against winsock2.
+ check_cxx_source_compiles("
+ #include <assuan.h>
+ static assuan_sock_nonce_t nonce;
+ int main() { return 0; }
+ "
+ HAVE_ASSUAN_SOCK_GET_NONCE )
+ if ( WIN32 AND NOT HAVE_ASSUAN_SOCK_GET_NONCE )
+ set( USABLE_ASSUAN_FOUND false )
+ endif ( WIN32 AND NOT HAVE_ASSUAN_SOCK_GET_NONCE )
+
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_tmp}) #pop
+ set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_tmp}) #pop
+
endif ( USABLE_ASSUAN_FOUND )
if ( USABLE_ASSUAN_FOUND )
- message( STATUS "Usable assuan found" )
+ message( STATUS "Usable assuan found for Kleopatra" )
else ( USABLE_ASSUAN_FOUND )
- message( STATUS "NO usable assuan found" )
+ message( STATUS "NO usable assuan found for Kleopatra" )
endif ( USABLE_ASSUAN_FOUND )
macro_bool_to_01( USABLE_ASSUAN_FOUND HAVE_USABLE_ASSUAN )
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 748426)
+++ CMakeLists.txt (working copy)
@@ -145,7 +145,6 @@
customactions.cpp
certmanager.cpp
hierarchyanalyser.cpp
- certificatewizardimpl.cpp
crlview.cpp
certlistview.cpp )