[Debburn-changes] r529 - in cdrkit/trunk: genisoimage include
Eduard Bloch
blade at alioth.debian.org
Fri Dec 1 20:19:02 CET 2006
Author: blade
Date: 2006-12-01 20:19:02 +0100 (Fri, 01 Dec 2006)
New Revision: 529
Modified:
cdrkit/trunk/genisoimage/CMakeLists.txt
cdrkit/trunk/include/CMakeLists.txt
Log:
libiconv lookup with CHECK_FUNCTION ; using getopt.c, getopt1.c on plattforms that do not provide getopt_long
Modified: cdrkit/trunk/genisoimage/CMakeLists.txt
===================================================================
--- cdrkit/trunk/genisoimage/CMakeLists.txt 2006-12-01 13:19:23 UTC (rev 528)
+++ cdrkit/trunk/genisoimage/CMakeLists.txt 2006-12-01 19:19:02 UTC (rev 529)
@@ -26,7 +26,15 @@
ADD_DEFINITIONS(-DUSE_LARGEFILES -DABORT_DEEP_ISO_ONLY -DAPPLE_HYB -DUDF -DDVD_VIDEO -DSORTING -DHAVE_CONFIG_H -DUSE_LIBSCHILY -DUSE_SCG -DJIGDO_TEMPLATE)
SET(MKISOFS_MOST_SRCS apple.c boot.c cd_misc.c defaults.c desktop.c dvd_file.c dvd_reader.c eltorito.c exclude.c files.c fnmatch.c getnum.c getopt.c getopt1.c hash.c ifo_read.c joliet.c mac_label.c match.c modes.c multi.c name.c rock.c scsi.c scsi_cdr.c stream.c tree.c udf.c vms.c volume.c write.c boot-alpha.c boot-hppa.c boot-mips.c md5.c jte.c rsync.c
- boot-mipsel.c endian.c )
+ boot-mipsel.c endian.c )
+
+INCLUDE(CheckFunctionExists)
+SET(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
+CHECK_FUNCTION_EXISTS("getopt_long" HAVE_GETOPT_LONG)
+IF(NOT HAVE_GETOPT_LONG)
+LIST ( APPEND MKISOFS_MOST_SRCS getopt.c getopt1.c )
+ENDIF(NOT HAVE_GETOPT_LONG)
+
#SET_SOURCE_FILES_PROPERTIES(${MKISOFS_MOST_SRCS} PROPERTIES )
LINK_DIRECTORIES(../libhfs_iso ../librols ../libusal ../libunls ../libdeflt)
Modified: cdrkit/trunk/include/CMakeLists.txt
===================================================================
--- cdrkit/trunk/include/CMakeLists.txt 2006-12-01 13:19:23 UTC (rev 528)
+++ cdrkit/trunk/include/CMakeLists.txt 2006-12-01 19:19:02 UTC (rev 529)
@@ -93,14 +93,30 @@
INCLUDE(CheckCSourceCompiles)
+INCLUDE(CheckFunctionExists)
-SET(CMAKE_REQUIRED_LIBRARIES iconv)
+#SET(CMAKE_REQUIRED_LIBRARIES iconv)
#SET(CMAKE_REQUIRED_FLAGS iconv)
SET(TESTSRC "
#include <iconv.h>
int main(int a, char **b) { iconv_t foo = iconv_open(b[0], b[0]); return(0); }
")
-CHECK_C_SOURCE_COMPILES("${TESTSRC}" USE_LIBICONV)
+
+SET(CMAKE_REQUIRED_LIBRARIES)
+SET(CMAKE_REQUIRED_INCLUDES "iconv.h")
+CHECK_FUNCTION_EXISTS("iconv_open" USE_LIBC_ICONV)
+IF(NOT USE_LIBC_ICONV)
+SET(CMAKE_REQUIRED_LIBRARIES iconv)
+CHECK_FUNCTION_EXISTS(iconv_open USE_LIBICONV)
+IF(NOT USE_LIBICONV)
+ message("ERROR: no library providing iconv found")
+ENDIF(NOT USE_LIBICONV)
+ENDIF(NOT USE_LIBC_ICONV)
+
+
+
+
+#CHECK_C_SOURCE_COMPILES("${TESTSRC}" USE_LIBICONV)
#IF(NOT USE_LIBICONV)
# FIND_FILE(ICONV_H_LOCATION "iconv.h")
# IF(NOT "${ICONV_H_LOCATION}" EQUAL "/usr/include/iconv.h")
More information about the Debburn-changes
mailing list