diff options
| author | Even Rouault <even.rouault@mines-paris.org> | 2017-07-03 12:03:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-03 12:03:29 +0200 |
| commit | 5736b1a3683261a5b31fc19a691731dc9fce5920 (patch) | |
| tree | 08b92ed4472533223c2bae1b2dc8cb0190988c29 /src | |
| parent | ecbfcbc2764ff1b09e693d57e3ef5764518f1e1c (diff) | |
| parent | a0839cca24e19f1f0906e30ee1009ce89e4942b4 (diff) | |
Merge pull request #954 from jeroen/static
build both shared and static library
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/openjp2/CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt index 0e8e9a9c..7f9fee31 100644 --- a/src/lib/openjp2/CMakeLists.txt +++ b/src/lib/openjp2/CMakeLists.txt @@ -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() |
