Skip to content

Commit

Permalink
Merge pull request #954 from jeroen/static
Browse files Browse the repository at this point in the history
build both shared and static library
  • Loading branch information
rouault authored Jul 3, 2017
2 parents ecbfcbc + a0839cc commit 5736b1a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/openjp2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +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} ${OPENJPEG_SRCS})

if(UNIX)
target_link_libraries(${OPENJPEG_LIBRARY_NAME} m)
endif()
Expand Down

0 comments on commit 5736b1a

Please sign in to comment.