revert to previous behaviour for cmake: builds (and links) dynamically by default...
[openjpeg.git] / codec / CMakeLists.txt
index cb2afeade5a62f8649b61bf88eda6c3cbc5a4260..5ad8958906dc6b620c54d5151f5a8ef2843ca449 100644 (file)
@@ -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)