forked from stepmania/stepmania
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeProject-png.cmake
54 lines (46 loc) · 1.27 KB
/
CMakeProject-png.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
if(WITH_SYSTEM_PNG)
find_package(PNG REQUIRED)
set(PNG_LIBRARIES ${PNG_LIBRARIES} PARENT_SCOPE)
else()
set(PNG_SRC
"libpng/png.c"
"libpng/pngerror.c"
"libpng/pngget.c"
"libpng/pngmem.c"
"libpng/pngpread.c"
"libpng/pngread.c"
"libpng/pngrio.c"
"libpng/pngrtran.c"
"libpng/pngrutil.c"
"libpng/pngset.c"
"libpng/pngtest.c"
"libpng/pngtrans.c"
"libpng/pngwio.c"
"libpng/pngwrite.c"
"libpng/pngwtran.c"
"libpng/pngwutil.c")
configure_file("libpng/scripts/pnglibconf.h.prebuilt"
"libpng/pnglibconf.h"
COPYONLY)
set(PNG_HPP
"libpng/png.h"
"libpng/pngconf.h"
"libpng/pngdebug.h"
"libpng/pnginfo.h"
"libpng/pnglibconf.h"
"libpng/pngpriv.h"
"libpng/pngstruct.h")
source_group("" FILES ${PNG_SRC})
source_group("" FILES ${PNG_HPP})
add_library("png" STATIC ${PNG_SRC} ${PNG_HPP})
set_property(TARGET "png" PROPERTY FOLDER "External Libraries")
disable_project_warnings("png")
if(MSVC)
sm_add_compile_definition("png" _CRT_SECURE_NO_WARNINGS)
endif()
target_include_directories("png" PUBLIC
"zlib"
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/libpng>
$<INSTALL_INTERFACE:libpng>
)
endif()