Libart-lgpl moved into a 'src' folder for consistency sake with the other

modules.
Add basic cmake build instructions.
Rework of the README file.
Some cosmetics.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
(cherry picked from commit 8349a964c2)
r14.0.x
gregory guy 4 years ago committed by Michele Calgaro
parent 000a818a2c
commit c64cc0c3b3
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -46,13 +46,13 @@ enable_testing( )
##### optional stuff ##### optional stuff
option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
##### user requested modules ##### user requested modules
option( BUILD_ALL "Build all" ON ) option( BUILD_ALL "Build all" ON )
option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
@ -70,171 +70,12 @@ set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined"
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ) set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
##### directories
add_subdirectory( src )
tde_conditional_add_subdirectory( BUILD_DOC doc )
##### write configure files ##### write configure files
configure_file( config.h.cmake config.h @ONLY ) configure_file( config.h.cmake config.h @ONLY )
configure_file( art_config.h.cmake art_config.h @ONLY )
configure_file( libart-features.h.cmake libart-features.h @ONLY )
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
##### art_lgpl_2
set( _SRCS art_affine.c art_alphagamma.c
art_bpath.c art_gray_svp.c
art_misc.c art_pixbuf.c
art_rect.c art_rect_svp.c
art_rect_uta.c art_render.c
art_render_gradient.c art_render_mask.c
art_render_svp.c art_rgb.c
art_rgb_affine.c art_rgb_affine_private.c
art_rgb_bitmap_affine.c art_rgb_pixbuf_affine.c
art_rgb_rgba_affine.c art_rgb_a_affine.c
art_rgba.c art_rgb_svp.c
art_svp.c art_svp_intersect.c
art_svp_ops.c art_svp_point.c
art_svp_render_aa.c art_svp_vpath.c
art_svp_vpath_stroke.c art_svp_wind.c
art_uta.c art_uta_ops.c
art_uta_rect.c art_uta_vpath.c
art_uta_svp.c art_vpath.c
art_vpath_bpath.c art_vpath_dash.c
art_vpath_svp.c libart-features.c
)
## shared
tde_add_library( art_lgpl_2 SHARED
SOURCES
${_SRCS}
LINK
m
VERSION ${LIBART_VERSION}
DESTINATION ${LIB_INSTALL_DIR}
)
## static
tde_add_library( art_lgpl_2 STATIC_PIC
SOURCES
${_SRCS}
LINK
m
VERSION ${LIBART_VERSION}
DESTINATION ${LIB_INSTALL_DIR}
)
## tests
tde_add_check_executable( testart
SOURCES
testart.c
LINK
art_lgpl_2-shared
m
)
add_test(
NAME testart-testpat
COMMAND testart testpat
)
#-- the testart-gradient often ends at sigsegv
#add_test(
# NAME testart-gradient
# COMMAND testart gradient
#)
add_test(
NAME testart-dash
COMMAND testart dash
)
add_test(
NAME testart-dist
COMMAND testart dist
)
add_test(
NAME testart-intersect
COMMAND testart intersect
)
tde_add_check_executable( testuta
SOURCES
testuta.c
LINK
art_lgpl_2-shared
m
TEST
)
##### Headers
set( _headers art_affine.h art_alphagamma.h
art_bpath.h
art_filterlevel.h art_gray_svp.h
art_misc.h art_pathcode.h art_pixbuf.h
art_point.h art_rect.h art_rect_svp.h
art_rect_uta.h art_render.h
art_render_gradient.h art_render_mask.h
art_render_svp.h art_rgb.h
art_rgb_affine.h art_rgb_bitmap_affine.h
art_rgb_pixbuf_affine.h art_rgb_rgba_affine.h
art_rgb_a_affine.h art_rgb_svp.h
art_rgba.h art_svp.h
art_svp_intersect.h art_svp_ops.h
art_svp_point.h art_svp_render_aa.h
art_svp_vpath.h art_svp_vpath_stroke.h
art_svp_wind.h art_uta.h
art_uta_ops.h art_uta_rect.h
art_uta_vpath.h art_uta_svp.h
art_vpath.h art_vpath_bpath.h
art_vpath_dash.h art_vpath_svp.h
libart.h
${CMAKE_CURRENT_BINARY_DIR}/art_config.h
${CMAKE_CURRENT_BINARY_DIR}/libart-features.h
)
install(
FILES ${_headers}
DESTINATION ${INCLUDE_INSTALL_DIR}/libart-2.0/libart_lgpl
)
#### pkg-config
set( prefix ${CMAKE_INSTALL_PREFIX} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" exec_prefix ${EXEC_INSTALL_PREFIX} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" includedir ${INCLUDE_INSTALL_DIR} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" libdir ${LIB_INSTALL_DIR} )
configure_file( libart-2.0.pc.cmake libart-2.0.pc @ONLY )
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libart-2.0.pc
DESTINATION ${PKGCONFIG_INSTALL_DIR}
)
install(
PROGRAMS libart2-config
DESTINATION ${BIN_INSTALL_DIR}
)
##### man page
tde_conditional_add_subdirectory( BUILD_DOC doc )

@ -50,3 +50,8 @@ else( )
tde_message_fatal( "sizeof(int) != 4 and sizeof(long) != 4" ) tde_message_fatal( "sizeof(int) != 4 and sizeof(long) != 4" )
endif( ) endif( )
endif( ) endif( )
##### check for the math libc
find_library( MATH_LIBC m )

@ -0,0 +1,11 @@
Basic Installation
==================
libart-lgpl relies on cmake to build.
Here are suggested default options:
-DCMAKE_SKIP_RPATH="OFF" \
-DCMAKE_VERBOSE_MAKEFILE="ON" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DWITH_ALL_OPTIONS="ON"

@ -1,21 +1,15 @@
This is the LGPL'd component of libart. All functions needed for
running the Gnome canvas, and for printing support, will be going in
here. The GPL'd component will be getting various enhanced functions
for specific applications.
Libart is free software. It is also for sale. For information about libart-lgpl - a 2D graphics library
licensing libart, please contact Raph Levien
<raph@acm.org>. Contributions to the codebase are also very welcome,
but the copyright must be assigned in writing to preserve the
licensing flexibility.
For more information about libart, see the web page: Libart-lgpl is a library of functions for 2D graphics supporting a
superset of the PostScript imaging model, designed to be integrated with
graphics, artwork and illustration programs.
It is written in optimized C and is fully compatible with C++.
With a small footprint of 10,000 lines of code, it is especially suitable
for embedded applications.
http://www.levien.com/libart/
There's also a libart tutorial available at
http://www.gnome.org/~mathieu/libart/libart.html
====================================================================== ======================================================================
@ -31,3 +25,24 @@ above, as patch copyright has NOT been transferred to the original
author and we have no plans to do so. author and we have no plans to do so.
====================================================================== ======================================================================
For more information about libart, see the web page:
http://www.levien.com/libart/
There's also a libart tutorial available at
http://www.gnome.org/~mathieu/libart/libart.html
CONTRIBUTING
==============
If you wish to contribute to libart-lgpl, you might do so:
- TDE Gitea Workspace (TGW) collaboration tool.
https://mirror.git.trinitydesktop.org/gitea
- TDE Weblate Translation Workspace (TWTW) collaboration tool.
https://mirror.git.trinitydesktop.org/weblate

@ -0,0 +1,172 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
##### write configure files
configure_file( art_config.h.cmake art_config.h @ONLY )
configure_file( libart-features.h.cmake libart-features.h @ONLY )
##### src
set( _SRCS art_affine.c art_alphagamma.c
art_bpath.c art_gray_svp.c
art_misc.c art_pixbuf.c
art_rect.c art_rect_svp.c
art_rect_uta.c art_render.c
art_render_gradient.c art_render_mask.c
art_render_svp.c art_rgb.c
art_rgb_affine.c art_rgb_affine_private.c
art_rgb_bitmap_affine.c art_rgb_pixbuf_affine.c
art_rgb_rgba_affine.c art_rgb_a_affine.c
art_rgba.c art_rgb_svp.c
art_svp.c art_svp_intersect.c
art_svp_ops.c art_svp_point.c
art_svp_render_aa.c art_svp_vpath.c
art_svp_vpath_stroke.c art_svp_wind.c
art_uta.c art_uta_ops.c
art_uta_rect.c art_uta_vpath.c
art_uta_svp.c art_vpath.c
art_vpath_bpath.c art_vpath_dash.c
art_vpath_svp.c libart-features.c
)
## shared
tde_add_library( art_lgpl_2 SHARED
SOURCES
${_SRCS}
LINK
${MATH_LIBC}
VERSION ${LIBART_VERSION}
DESTINATION ${LIB_INSTALL_DIR}
)
## static
tde_add_library( art_lgpl_2 STATIC_PIC
SOURCES
${_SRCS}
LINK
${MATH_LIBC}
VERSION ${LIBART_VERSION}
DESTINATION ${LIB_INSTALL_DIR}
)
## tests
tde_add_check_executable( testart
SOURCES
testart.c
LINK
art_lgpl_2-shared
${MATH_LIBC}
)
add_test(
NAME testart-testpat
COMMAND testart testpat
)
#-- the testart-gradient often ends at sigsegv
#add_test(
# NAME testart-gradient
# COMMAND testart gradient
#)
add_test(
NAME testart-dash
COMMAND testart dash
)
add_test(
NAME testart-dist
COMMAND testart dist
)
add_test(
NAME testart-intersect
COMMAND testart intersect
)
tde_add_check_executable( testuta
SOURCES
testuta.c
LINK
art_lgpl_2-shared
${MATH_LIBC}
TEST
)
##### Headers
set( _headers art_affine.h art_alphagamma.h
art_bpath.h
art_filterlevel.h art_gray_svp.h
art_misc.h art_pathcode.h art_pixbuf.h
art_point.h art_rect.h art_rect_svp.h
art_rect_uta.h art_render.h
art_render_gradient.h art_render_mask.h
art_render_svp.h art_rgb.h
art_rgb_affine.h art_rgb_bitmap_affine.h
art_rgb_pixbuf_affine.h art_rgb_rgba_affine.h
art_rgb_a_affine.h art_rgb_svp.h
art_rgba.h art_svp.h
art_svp_intersect.h art_svp_ops.h
art_svp_point.h art_svp_render_aa.h
art_svp_vpath.h art_svp_vpath_stroke.h
art_svp_wind.h art_uta.h
art_uta_ops.h art_uta_rect.h
art_uta_vpath.h art_uta_svp.h
art_vpath.h art_vpath_bpath.h
art_vpath_dash.h art_vpath_svp.h
libart.h
${CMAKE_CURRENT_BINARY_DIR}/art_config.h
${CMAKE_CURRENT_BINARY_DIR}/libart-features.h
)
install(
FILES ${_headers}
DESTINATION ${INCLUDE_INSTALL_DIR}/libart-2.0/libart_lgpl
)
#### pkg-config
set( prefix ${CMAKE_INSTALL_PREFIX} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" exec_prefix ${EXEC_INSTALL_PREFIX} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" includedir ${INCLUDE_INSTALL_DIR} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" libdir ${LIB_INSTALL_DIR} )
configure_file( libart-2.0.pc.cmake libart-2.0.pc @ONLY )
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libart-2.0.pc
DESTINATION ${PKGCONFIG_INSTALL_DIR}
)
##### config helper
install(
PROGRAMS libart2-config
DESTINATION ${BIN_INSTALL_DIR}
)
Loading…
Cancel
Save