Fix some error with cmake
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 3 Jun 2011 13:44:58 +0000 (13:44 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 3 Jun 2011 13:44:58 +0000 (13:44 +0000)
CHANGES
applications/CMakeLists.txt
applications/codec/CMakeLists.txt

diff --git a/CHANGES b/CHANGES
index 3773a5869158a7386d5be53149c6756011caab0e..5cd44304eeb47441e09f94b49b34aa962bd39117 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,7 @@ What's New for OpenJPEG
 
 June 3, 2011
 + [malaterre] adding partno and numpart info as part of the warning message (issue #69)
++ [malaterre] make sure that cmake build system works on debian
 
 May 23, 2011
 * [antonin] fixed a bug in autotools that prevented "make distcheck" to work properly (credit to Vincent Torri)
index 43081e8f20d782e602fb25e66f4549c0b4324760..5f413169a26f516f8d711923e330cf9d96e981ef 100644 (file)
@@ -86,7 +86,7 @@ ENDIF()
    SET(HAVE_LCMS2_H 1)
    SET(HAVE_LIBLCMS2 1)
 #
-   ADD_SUBDIRECTORY(${OPENJPEG_SOURCE_DIR}/thirdparty)
+#ADD_SUBDIRECTORY(${OPENJPEG_SOURCE_DIR}/thirdparty)
 #
    LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/thirdparty/lib)
 #
@@ -127,4 +127,4 @@ ENDIF(BUILD_CODEC)
 IF(BUILD_MJ2)
  ADD_SUBDIRECTORY(mj2)
 ENDIF(BUILD_MJ2)
-#
\ No newline at end of file
+#
index 37c8bb5dec60d623b0759f71430463545811a97d..44f10872df91f426207daf4cb8e8025c1044f68b 100644 (file)
@@ -37,7 +37,11 @@ ENDIF(WIN32)
 FOREACH(exe j2k_to_image image_to_j2k j2k_dump)
   ADD_EXECUTABLE(${exe} ${exe}.c ${common_SRCS})
   TARGET_LINK_LIBRARIES(${exe} ${OPENJPEG_LIBRARY_NAME} 
-       ${LCMS_LIBNAME} ${Z_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
+${Z_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
+
+  IF(LCMS_FOUND OR LCMS2_FOUND)
+    TARGET_LINK_LIBRARIES(${exe} ${LCMS_LIBNAME})
+  ENDIF(LCMS_FOUND OR LCMS2_FOUND)
 
   ADD_TEST(${exe} ${EXECUTABLE_OUTPUT_PATH}/${exe})
   # calling those exe without option will make them fail always: