diff options
| author | Antonin Descampe <antonin@gmail.com> | 2010-11-28 17:07:04 +0000 |
|---|---|---|
| committer | Antonin Descampe <antonin@gmail.com> | 2010-11-28 17:07:04 +0000 |
| commit | eb5694ca2a629f707736cbf203b21472ba6a0716 (patch) | |
| tree | d579066b589f5a0ca1de9451aa2c932240cfb226 /mj2 | |
| parent | 389166e86e14a3a09ccf3d28ca0ee64968c5de45 (diff) | |
changed cmake behaviour: executables are now always statically linked. When -DBUIL_SHARED_LIBS option is ON (the default), the shared versions of the libraries are also built (but executables remain linked against the static libraries).
Diffstat (limited to 'mj2')
| -rw-r--r-- | mj2/CMakeLists.txt | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/mj2/CMakeLists.txt b/mj2/CMakeLists.txt index d8ca819b..f678ee83 100644 --- a/mj2/CMakeLists.txt +++ b/mj2/CMakeLists.txt @@ -9,9 +9,7 @@ INCLUDE_DIRECTORIES( # 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) +ADD_DEFINITIONS(-DOPJ_STATIC) ADD_EXECUTABLE(frames_to_mj2 frames_to_mj2.c @@ -19,7 +17,7 @@ ADD_EXECUTABLE(frames_to_mj2 mj2_convert.c mj2.c ) -TARGET_LINK_LIBRARIES(frames_to_mj2 ${OPJ_PREFIX}openjpeg ${LCMS_LIB}) +TARGET_LINK_LIBRARIES(frames_to_mj2 ${OPENJPEG_LIBRARY_NAME}.static ${LCMS_LIB}) IF(UNIX) TARGET_LINK_LIBRARIES(frames_to_mj2 m) ENDIF(UNIX) @@ -30,7 +28,7 @@ ADD_EXECUTABLE(mj2_to_frames mj2_convert.c mj2.c ) -TARGET_LINK_LIBRARIES(mj2_to_frames ${OPJ_PREFIX}openjpeg ${LCMS_LIB}) +TARGET_LINK_LIBRARIES(mj2_to_frames ${OPENJPEG_LIBRARY_NAME}.static ${LCMS_LIB}) IF(UNIX) TARGET_LINK_LIBRARIES(mj2_to_frames m) ENDIF(UNIX) @@ -38,7 +36,7 @@ ENDIF(UNIX) ADD_EXECUTABLE(extract_j2k_from_mj2 extract_j2k_from_mj2.c mj2.c ) -TARGET_LINK_LIBRARIES(extract_j2k_from_mj2 ${OPJ_PREFIX}openjpeg ${LCMS_LIB}) +TARGET_LINK_LIBRARIES(extract_j2k_from_mj2 ${OPENJPEG_LIBRARY_NAME}.static ${LCMS_LIB}) IF(UNIX) TARGET_LINK_LIBRARIES(extract_j2k_from_mj2 m) ENDIF(UNIX) @@ -46,7 +44,7 @@ ENDIF(UNIX) ADD_EXECUTABLE(wrap_j2k_in_mj2 wrap_j2k_in_mj2.c mj2.c ) -TARGET_LINK_LIBRARIES(wrap_j2k_in_mj2 ${OPJ_PREFIX}openjpeg ${LCMS_LIB}) +TARGET_LINK_LIBRARIES(wrap_j2k_in_mj2 ${OPENJPEG_LIBRARY_NAME}.static ${LCMS_LIB}) IF(UNIX) TARGET_LINK_LIBRARIES(wrap_j2k_in_mj2 m) ENDIF(UNIX) |
