revert to previous behaviour for cmake: builds (and links) dynamically by default. Static build only if -DBUILD_SHARED_LIBS is set to OFF.
This commit is contained in:
@@ -14,10 +14,6 @@ IF(DONT_HAVE_GETOPT)
|
||||
)
|
||||
ENDIF(DONT_HAVE_GETOPT)
|
||||
|
||||
# Do the proper thing when building static...if only there was configured
|
||||
# headers or def files instead
|
||||
ADD_DEFINITIONS(-DOPJ_STATIC)
|
||||
|
||||
# Headers file are located here:
|
||||
INCLUDE_DIRECTORIES(
|
||||
${OPENJPEG_SOURCE_DIR}/libopenjpeg
|
||||
@@ -33,7 +29,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} ${OPENJPEG_LIBRARY_NAME}.static ${LCMS_LIB})
|
||||
TARGET_LINK_LIBRARIES(${exe} ${OPENJPEG_LIBRARY_NAME} ${LCMS_LIB})
|
||||
IF(PNG_FOUND)
|
||||
TARGET_LINK_LIBRARIES(${exe} ${PNG_LIBRARIES})
|
||||
ENDIF(PNG_FOUND)
|
||||
|
||||
Reference in New Issue
Block a user