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 /codec | |
| 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 'codec')
| -rw-r--r-- | codec/CMakeLists.txt | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/codec/CMakeLists.txt b/codec/CMakeLists.txt index 4a9d63df..cb2afead 100644 --- a/codec/CMakeLists.txt +++ b/codec/CMakeLists.txt @@ -16,9 +16,7 @@ ENDIF(DONT_HAVE_GETOPT) # 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) # Headers file are located here: INCLUDE_DIRECTORIES( @@ -35,7 +33,7 @@ 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 ${LCMS_LIB}) + TARGET_LINK_LIBRARIES(${exe} ${OPENJPEG_LIBRARY_NAME}.static ${LCMS_LIB}) IF(PNG_FOUND) TARGET_LINK_LIBRARIES(${exe} ${PNG_LIBRARIES}) ENDIF(PNG_FOUND) |
