X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2Fgdcmopenjpeg%2Fcodec%2FCMakeLists.txt;h=3f3c7d5a3f5a3521dab16c111d6700e2008abc70;hb=76bb7282f2aee8ff167483c0ccf3397769b21326;hp=ee496e33a488269a56ecdc65bccc5f21d02a3697;hpb=48215bafde3d6955d9cd60e074f6d6832ea9752f;p=gdcm.git diff --git a/src/gdcmopenjpeg/codec/CMakeLists.txt b/src/gdcmopenjpeg/codec/CMakeLists.txt index ee496e33..3f3c7d5a 100644 --- a/src/gdcmopenjpeg/codec/CMakeLists.txt +++ b/src/gdcmopenjpeg/codec/CMakeLists.txt @@ -30,10 +30,17 @@ INCLUDE_DIRECTORIES( ${OPENJPEG_SOURCE_DIR}/libopenjpeg ) +# Do the proper thing when building static...if only there was configured +# headers or def files instead +IF(NOT BUILD_SHARED_LIBS) + ADD_DEFINITIONS(-DOPJ_STATIC) +ENDIF(NOT BUILD_SHARED_LIBS) + # 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) + # On unix you need to link to the math library: IF(UNIX) TARGET_LINK_LIBRARIES(${exe} -lm) ENDIF(UNIX)