Merge pull request #6630 from lioncash/png
CMakeLists: Don't dump libpng's includes into the top-level directory
This commit is contained in:
commit
140da8c1a0
|
@ -599,7 +599,6 @@ if (PNG_FOUND)
|
||||||
else()
|
else()
|
||||||
message(STATUS "Using static libpng from Externals")
|
message(STATUS "Using static libpng from Externals")
|
||||||
add_subdirectory(Externals/libpng)
|
add_subdirectory(Externals/libpng)
|
||||||
include_directories(Externals/libpng)
|
|
||||||
set(PNG png)
|
set(PNG png)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# OUR SOURCES
|
add_library(png STATIC
|
||||||
set(SRCS
|
|
||||||
png.h
|
png.h
|
||||||
pngconf.h
|
pngconf.h
|
||||||
png.c
|
png.c
|
||||||
|
@ -18,7 +17,15 @@ set(SRCS
|
||||||
pngwtran.c
|
pngwtran.c
|
||||||
pngwutil.c
|
pngwutil.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(png
|
||||||
|
PUBLIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
add_definitions(-Wno-self-assign)
|
target_compile_options(png
|
||||||
|
PRIVATE
|
||||||
|
-Wno-self-assign
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
add_library(png STATIC ${SRCS})
|
|
||||||
|
|
Loading…
Reference in New Issue