Reactivate ctest
[openjpeg.git] / codec / CMakeLists.txt
index 26cd7eebbc323efb168c413cd74451c75e044393..32aed5eea1b0461a4a5e290f67b3149035a90711 100644 (file)
@@ -38,11 +38,12 @@ IF(NOT BUILD_SHARED_LIBS)
 ENDIF(NOT BUILD_SHARED_LIBS)
 
 FIND_PACKAGE(TIFF REQUIRED)
+FIND_PACKAGE(PNG REQUIRED)
 
 # Loop over all executables:
 FOREACH(exe j2k_to_image image_to_j2k)
   ADD_EXECUTABLE(${exe} ${exe}.c ${common_SRCS})
-  TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg ${TIFF_LIBRARIES})
+  TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg ${TIFF_LIBRARIES} ${PNG_LIBRARIES})
   ADD_TEST(${exe} ${EXECUTABLE_OUTPUT_PATH}/${exe})
   # calling those exe without option will make them fail always:
   SET_TESTS_PROPERTIES(${exe} PROPERTIES WILL_FAIL TRUE)