diff options
Diffstat (limited to 'jpeg')
| -rw-r--r-- | jpeg/CMakeLists.txt | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/jpeg/CMakeLists.txt b/jpeg/CMakeLists.txt index a5c27a21e..2e30f2d2e 100644 --- a/jpeg/CMakeLists.txt +++ b/jpeg/CMakeLists.txt @@ -27,18 +27,39 @@ set(decompression_SRCS list(APPEND BUILD_SRCS "${systemdependent_SRCS};${common_SRCS}") list(APPEND BUILD_SRCS "${compression_SRCS};${decompression_SRCS}") + ####################################################################### -FL_ADD_LIBRARY(fltk_jpeg STATIC "${BUILD_SRCS}") -# install the jpeg headers -install(FILES jconfig.h;jerror.h;jmorecfg.h;jpeglib.h - DESTINATION ${FLTK_INCLUDEDIR}/FL/images -) + +# Suppress some Visual Studio compiler warnings +set (msvc_warnings /wd4267) ####################################################################### -if(OPTION_BUILD_SHARED_LIBS) +# Build the static library ####################################################################### -FL_ADD_LIBRARY(fltk_jpeg SHARED "${BUILD_SRCS}") + +FL_ADD_LIBRARY (fltk_jpeg STATIC "${BUILD_SRCS}") + +if (MSVC) + target_compile_options (fltk_jpeg PRIVATE ${msvc_warnings}) +endif (MSVC) ####################################################################### -endif(OPTION_BUILD_SHARED_LIBS) +# Build the shared library (optional) ####################################################################### + +if (OPTION_BUILD_SHARED_LIBS) + FL_ADD_LIBRARY (fltk_jpeg SHARED "${BUILD_SRCS}") + + if (MSVC) + target_compile_options (fltk_jpeg_SHARED PRIVATE ${msvc_warnings}) + endif (MSVC) + +endif (OPTION_BUILD_SHARED_LIBS) + +####################################################################### +# Install the library headers +####################################################################### + +install (FILES jconfig.h jerror.h jmorecfg.h jpeglib.h + DESTINATION ${FLTK_INCLUDEDIR}/FL/images +) |
