From: malaterre Date: Thu, 9 Jun 2005 22:24:38 +0000 (+0000) Subject: COMP: Can now configure gdcmjpegls as a separate project, also fix the inline keyword... X-Git-Tag: Version1.2.bp~547 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6eca7a739f60b65a7c554eafe0a8e7d68f3c5a54;p=gdcm.git COMP: Can now configure gdcmjpegls as a separate project, also fix the inline keyword test was failing with compiler that support inline. --- diff --git a/src/gdcmjpegls/CMakeLists.txt b/src/gdcmjpegls/CMakeLists.txt index 7aca453f..b7ebbee5 100644 --- a/src/gdcmjpegls/CMakeLists.txt +++ b/src/gdcmjpegls/CMakeLists.txt @@ -6,7 +6,8 @@ PROJECT(GDCMJPEGLS) IF("HAVE_C_INLINE" MATCHES "^HAVE_C_INLINE$") STRING(ASCII 35 POUND) FILE(WRITE ${GDCMJPEGLS_BINARY_DIR}/gdcmTestInline.c - "inline int foo() { return 0; }") + "inline int foo() { return 0; }\n + int main() { return foo(); }") MESSAGE(STATUS "Checking if C compiler has inline keyword") TRY_COMPILE(HAVE_C_INLINE ${GDCMJPEGLS_BINARY_DIR} @@ -29,6 +30,7 @@ IF("HAVE_C_INLINE" MATCHES "^HAVE_C_INLINE$") ENDIF(HAVE_C_INLINE) ENDIF("HAVE_C_INLINE" MATCHES "^HAVE_C_INLINE$") +INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H) CONFIGURE_FILE( "${GDCMJPEGLS_SOURCE_DIR}/jpegls_config.h.in"