2016-11-26 07:48:19 +08:00
cmake_minimum_required ( VERSION 3.0 )
2018-10-27 00:28:03 +08:00
project ( pixman VERSION 0.34.0 LANGUAGES C )
2016-11-26 07:48:19 +08:00
2018-03-12 14:41:51 +08:00
set ( CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON )
set ( CMAKE_DEBUG_POSTFIX "d" )
2018-10-27 00:28:03 +08:00
if ( UNIX )
2018-08-01 08:10:12 +08:00
add_definitions ( -DHAVE_PTHREADS )
endif ( )
2018-03-12 14:41:51 +08:00
include_directories ( "." )
file ( GLOB SOURCES
" p i x m a n . c "
" p i x m a n - a c c e s s . c "
" p i x m a n - a c c e s s - a c c e s s o r s . c "
" p i x m a n - b i t s - i m a g e . c "
" p i x m a n - c o m b i n e 3 2 . c "
" p i x m a n - c o m b i n e - f l o a t . c "
" p i x m a n - c o n i c a l - g r a d i e n t . c "
" p i x m a n - f i l t e r . c "
" p i x m a n - x 8 6 . c "
" p i x m a n - m i p s . c "
" p i x m a n - a r m . c "
" p i x m a n - p p c . c "
" p i x m a n - e d g e . c "
" p i x m a n - e d g e - a c c e s s o r s . c "
" p i x m a n - f a s t - p a t h . c "
" p i x m a n - g l y p h . c "
" p i x m a n - g e n e r a l . c "
" p i x m a n - g r a d i e n t - w a l k e r . c "
" p i x m a n - i m a g e . c "
" p i x m a n - i m p l e m e n t a t i o n . c "
" p i x m a n - l i n e a r - g r a d i e n t . c "
" p i x m a n - m a t r i x . c "
" p i x m a n - n o o p . c "
" p i x m a n - r a d i a l - g r a d i e n t . c "
" p i x m a n - r e g i o n 1 6 . c "
" p i x m a n - r e g i o n 3 2 . c "
" p i x m a n - s o l i d - f i l l . c "
" p i x m a n - t i m e r . c "
" p i x m a n - t r a p . c "
" p i x m a n - u t i l s . c "
" p i x m a n - s s e 2 . c "
)
add_library ( pixman-1 ${ SOURCES } )
2018-09-12 04:11:51 +08:00
target_include_directories ( pixman-1 PUBLIC $< INSTALL_INTERFACE:include > )
2018-03-12 14:41:51 +08:00
# pixman requires the three PACKAGE* definitions in order to compile. The USE_SSE2 definition lets it use SSE2 instructions for speed. Every target machine should have SSE2 these days.
target_compile_definitions ( pixman-1
2018-09-12 04:11:51 +08:00
P R I V A T E
2018-03-12 14:41:51 +08:00
P A C K A G E = " p i x m a n - 1 "
P A C K A G E _ V E R S I O N = " 0 . 3 4 . 0 "
P A C K A G E _ B U G R E P O R T = " "
U S E _ S S E 2
)
# pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files
if ( MSVC )
target_compile_options ( pixman-1 PRIVATE "/wd4244" "/wd4146" "/wd4996" ) # PUBLIC "/D_CRT_SECURE_NO_WARNINGS"
endif ( )
install ( TARGETS pixman-1
2018-09-12 04:11:51 +08:00
E X P O R T p i x m a n - t a r g e t s
2018-03-12 14:41:51 +08:00
R U N T I M E D E S T I N A T I O N b i n
L I B R A R Y D E S T I N A T I O N l i b
A R C H I V E D E S T I N A T I O N l i b
)
2018-09-12 04:11:51 +08:00
install (
E X P O R T p i x m a n - t a r g e t s
N A M E S P A C E u n o f f i c i a l : : p i x m a n : :
F I L E u n o f f i c i a l - p i x m a n - c o n f i g . c m a k e
D E S T I N A T I O N s h a r e / u n o f f i c i a l - p i x m a n
)