]> granicus.if.org Git - openjpeg/commitdiff
only build both static and dynamic on non-windows
authorJeroen Ooms <jeroenooms@gmail.com>
Fri, 16 Jun 2017 11:58:25 +0000 (13:58 +0200)
committerJeroen Ooms <jeroenooms@gmail.com>
Fri, 16 Jun 2017 11:58:25 +0000 (13:58 +0200)
src/lib/openjp2/CMakeLists.txt

index 635cc29f1f7ec18a8957846c67c6f1d8355c73a5..501fa6f994fee280ee227facb7e69a31f34d29f7 100644 (file)
@@ -86,10 +86,14 @@ if(WIN32)
   else()
     add_definitions(-DOPJ_STATIC)
   endif()
+  add_library(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
+else()
+  # Builds both static and dynamic libs
+  add_library(${OPENJPEG_LIBRARY_NAME} SHARED ${OPENJPEG_SRCS})
+  add_library(openjp2_static STATIC ${OPENJPEG_SRCS})
+  set_target_properties(openjp2_static PROPERTIES OUTPUT_NAME ${OPENJPEG_LIBRARY_NAME})
 endif()
-add_library(${OPENJPEG_LIBRARY_NAME} SHARED ${OPENJPEG_SRCS})
-add_library(openjp2_static STATIC ${OPENJPEG_SRCS})
-set_target_properties(openjp2_static PROPERTIES OUTPUT_NAME ${OPENJPEG_LIBRARY_NAME})
+
 if(UNIX)
   target_link_libraries(${OPENJPEG_LIBRARY_NAME} m)
 endif()