~esignature/esignature/bdoc

« back to all changes in this revision

Viewing changes to debian/libdigidocpp-3.6/cmake/modules/FindIconv.cmake

  • Committer: joger quintero
  • Date: 2012-12-20 15:28:28 UTC
  • Revision ID: joger@debian-joger234-20121220152828-nquaoqd20p3bi9lk
.-Se añadió el directorio debian con las fuentes para debianizar.
.-Se añadió el directorio paquetes con el subdirectorio amd64 que contiene los .deb
.-Se corrigió un error en el view.py del cliente python que no mostraba correctamente la verificación de la firma

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# /kde/kdesupport/strigi/cmake
 
2
# - Try to find Iconv 
 
3
# Once done this will define 
 
4
 
5
#  ICONV_FOUND - system has Iconv 
 
6
#  ICONV_INCLUDE_DIR - the Iconv include directory 
 
7
#  ICONV_LIBRARIES - Link these to use Iconv 
 
8
#  ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const
 
9
 
10
include(CheckCXXSourceCompiles)
 
11
 
 
12
IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
 
13
  # Already in cache, be silent
 
14
  SET(ICONV_FIND_QUIETLY TRUE)
 
15
ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
 
16
 
 
17
FIND_PATH(ICONV_INCLUDE_DIR iconv.h) 
 
18
 
 
19
FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c)
 
20
 
 
21
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 
 
22
   SET(ICONV_FOUND TRUE) 
 
23
ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 
 
24
 
 
25
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
 
26
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
 
27
IF(ICONV_FOUND)
 
28
  check_cxx_source_compiles("
 
29
  #include <iconv.h>
 
30
  int main(){
 
31
    iconv_t conv = 0;
 
32
    const char* in = 0;
 
33
    size_t ilen = 0;
 
34
    char* out = 0;
 
35
    size_t olen = 0;
 
36
    iconv(conv, &in, &ilen, &out, &olen);
 
37
    return 0;
 
38
  }
 
39
" ICONV_SECOND_ARGUMENT_IS_CONST )
 
40
ENDIF(ICONV_FOUND)
 
41
set(CMAKE_REQUIRED_INCLUDES)
 
42
set(CMAKE_REQUIRED_LIBRARIES)
 
43
 
 
44
IF(ICONV_FOUND) 
 
45
  IF(NOT ICONV_FIND_QUIETLY) 
 
46
    MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") 
 
47
  ENDIF(NOT ICONV_FIND_QUIETLY) 
 
48
ELSE(ICONV_FOUND) 
 
49
  IF(Iconv_FIND_REQUIRED) 
 
50
    MESSAGE(FATAL_ERROR "Could not find Iconv") 
 
51
  ENDIF(Iconv_FIND_REQUIRED) 
 
52
ENDIF(ICONV_FOUND) 
 
53
 
 
54
MARK_AS_ADVANCED(
 
55
  ICONV_INCLUDE_DIR
 
56
  ICONV_LIBRARIES
 
57
  ICONV_SECOND_ARGUMENT_IS_CONST
 
58
)