Skip to content

Commit

Permalink
JpegImageConverter: use JPEG_INCLUDE_DIR.
Browse files Browse the repository at this point in the history
JPEG_INCLUDE_DIRS is not present in CMake before 3.12.
  • Loading branch information
mosra committed Feb 7, 2019
1 parent 9c81cdc commit d0b3385
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
10 changes: 9 additions & 1 deletion doc/changelog-plugins.dox
Expand Up @@ -30,7 +30,15 @@ namespace Magnum {
@tableofcontents
@m_footernavigation

@anchor changelog-plugins-latest
@section changelog-plugins-latest Changes since 2019.01

@subsection changelog-plugins-latest-buildsystem Build system

- The @ref Trade::JpegImageConverter "JpegImageConverter" plugin was
mistakenly using the `JPEG_INCLUDE_DIRS` CMake variable which was not
present on versions before 3.12. The @ref Trade::JpegImporter "JpegImporter"
plugin is not affected by this. See also
[mosra/magnum-plugins#51](https://github.com/mosra/magnum-plugins/issues/51).

@section changelog-plugins-2019-01 2019.01

Expand Down
4 changes: 3 additions & 1 deletion src/MagnumPlugins/JpegImageConverter/CMakeLists.txt
Expand Up @@ -48,7 +48,9 @@ target_include_directories(JpegImageConverter
${PROJECT_SOURCE_DIR}/src
${PROJECT_BINARY_DIR}/src
PRIVATE
${JPEG_INCLUDE_DIRS})
# JPEG_INCLUDE_DIRS is only since 3.12 (and there we should use the
# imported target instead anyway)
${JPEG_INCLUDE_DIR})
target_link_libraries(JpegImageConverter PUBLIC
Magnum::Trade
${JPEG_LIBRARIES})
Expand Down
5 changes: 4 additions & 1 deletion src/MagnumPlugins/JpegImporter/CMakeLists.txt
Expand Up @@ -43,7 +43,10 @@ add_plugin(JpegImporter
if(BUILD_PLUGINS_STATIC AND BUILD_STATIC_PIC)
set_target_properties(JpegImporter PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
target_include_directories(JpegImporter SYSTEM PRIVATE ${JPEG_INCLUDE_DIR})
target_include_directories(JpegImporter SYSTEM PRIVATE
# JPEG_INCLUDE_DIRS is only since 3.12 (and there we should use the
# imported target instead anyway)
${JPEG_INCLUDE_DIR})
target_include_directories(JpegImporter PUBLIC
${PROJECT_SOURCE_DIR}/src
${PROJECT_BINARY_DIR}/src)
Expand Down

0 comments on commit d0b3385

Please sign in to comment.