diff options
| author | Antonin Descampe <antonin@gmail.com> | 2010-10-05 10:33:15 +0000 |
|---|---|---|
| committer | Antonin Descampe <antonin@gmail.com> | 2010-10-05 10:33:15 +0000 |
| commit | eeefefd56cb3edddefb73141733fd1e757c4b798 (patch) | |
| tree | 4727958764c4c348762c043c2efbb7470a9ffcca /codec/CMakeLists.txt | |
| parent | 531c0cf26f0c327b42a5caa79725e4afeb98768d (diff) | |
Added files to let people build openjpeg with configure tools ; Added makefiles to let people manually build openjpeg on *nix platforms ; Removed obsolete Makefiles ; Renamed dirent.h to windirent.h ; Made optional the PNG, TIFF, and LCMS support in CMake files ; Added opj_config* files to configure openjpeg before building it (opj_config.h generated by configure, cmake, or manually by the user) ; Renamed this file from ChangeLog to CHANGES ; Renamed License.txt to LICENSE ; Updated README files ; Added INSTALL and LICENSE files ; Added man pages
Diffstat (limited to 'codec/CMakeLists.txt')
| -rw-r--r-- | codec/CMakeLists.txt | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/codec/CMakeLists.txt b/codec/CMakeLists.txt index 563ae6dd..e24ac470 100644 --- a/codec/CMakeLists.txt +++ b/codec/CMakeLists.txt @@ -23,17 +23,25 @@ ENDIF(NOT BUILD_SHARED_LIBS) # Headers file are located here: INCLUDE_DIRECTORIES( ${OPENJPEG_SOURCE_DIR}/libopenjpeg + ${LCMS_INCLUDE_DIR} ) - -FIND_PACKAGE(TIFF REQUIRED) -FIND_PACKAGE(PNG REQUIRED) -INCLUDE_DIRECTORIES( ${PNG_INCLUDE_DIR} ) -INCLUDE_DIRECTORIES( ${TIFF_INCLUDE_DIR} ) +IF(PNG_FOUND) + INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR}) +ENDIF(PNG_FOUND) +IF(TIFF_FOUND) + INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) +ENDIF(TIFF_FOUND) # Loop over all executables: FOREACH(exe j2k_to_image image_to_j2k j2k_dump) ADD_EXECUTABLE(${exe} ${exe}.c ${common_SRCS}) - TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg ${TIFF_LIBRARIES} ${PNG_LIBRARIES}) + TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg ${LCMS_LIB}) + IF(PNG_FOUND) + TARGET_LINK_LIBRARIES(${exe} ${PNG_LIBRARIES}) + ENDIF(PNG_FOUND) + IF(TIFF_FOUND) + TARGET_LINK_LIBRARIES(${exe} ${TIFF_LIBRARIES}) + ENDIF(TIFF_FOUND) 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) |
