Skip to content
Permalink
Browse files
Merge pull request #6630 from lioncash/png
CMakeLists: Don't dump libpng's includes into the top-level directory
  • Loading branch information
degasus committed Apr 13, 2018
2 parents bbd1bb8 + 6a637cf commit 140da8c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
@@ -599,7 +599,6 @@ if (PNG_FOUND)
else()
message(STATUS "Using static libpng from Externals")
add_subdirectory(Externals/libpng)
include_directories(Externals/libpng)
set(PNG png)
endif()

@@ -1,5 +1,4 @@
# OUR SOURCES
set(SRCS
add_library(png STATIC
png.h
pngconf.h
png.c
@@ -18,7 +17,15 @@ set(SRCS
pngwtran.c
pngwutil.c
)

target_include_directories(png
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)

if(NOT MSVC)
add_definitions(-Wno-self-assign)
target_compile_options(png
PRIVATE
-Wno-self-assign
)
endif()
add_library(png STATIC ${SRCS})

0 comments on commit 140da8c

Please sign in to comment.