Skip to content

Commit

Permalink
Cleanup parent_scope hack a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Drago committed Apr 15, 2020
1 parent 1e73870 commit 4283ebe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@ endif()
option(AVIF_LOCAL_JPEG "Build jpeg by providing your own copy inside the ext subdir." OFF)
if(AVIF_LOCAL_JPEG)
add_subdirectory(ext/libjpeg)
set(JPEG_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ext/libjpeg" PARENT_SCOPE)
set(JPEG_LIBRARY jpeg PARENT_SCOPE)
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
set(JPEG_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ext/libjpeg")
set(JPEG_LIBRARY jpeg)
else()
set(JPEG_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ext/libjpeg" PARENT_SCOPE)
set(JPEG_LIBRARY jpeg PARENT_SCOPE)
endif()
endif()
# ---------------------------------------------------------------------------------------

Expand Down

0 comments on commit 4283ebe

Please sign in to comment.