reactos/dll/3rdparty/libpng/CMakeLists.txt
Jérôme Gardou 23373acbb9 [CMAKE] Use modules instead of shared libraries
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.

On my system, this reduces the configure-time by a factor of two.
2019-04-06 17:43:38 +02:00

36 lines
708 B
CMake

add_definitions(
-DWIN32
-DNDEBUG
-D_WINDOWS
-DPNG_BUILD_DLL)
include_directories(
${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/libpng
${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
list(APPEND SOURCE
png.c
pngerror.c
pngget.c
pngmem.c
pngpread.c
pngread.c
pngrio.c
pngrtran.c
pngrutil.c
pngset.c
pngtrans.c
pngwio.c
pngwrite.c
pngwtran.c
pngwutil.c
pngpriv.h)
add_library(libpng MODULE ${SOURCE})
set_module_type(libpng win32dll)
target_link_libraries(libpng zlib)
add_importlibs(libpng msvcrt kernel32 ntdll)
add_pch(libpng pngpriv.h SOURCE)
add_cd_file(TARGET libpng DESTINATION reactos/system32 FOR all)