diff --git a/agg-src/CMakeLists.txt b/agg-src/CMakeLists.txt index 8e4f5417..25305083 100644 --- a/agg-src/CMakeLists.txt +++ b/agg-src/CMakeLists.txt @@ -17,6 +17,7 @@ OPTION( agg_BUILD_DEMO "Build the AGG demo" ON) OPTION( agg_BUILD_PLATFORM "Build the AGG platform helper" ON) OPTION( agg_BUILD_CONTROLS "Build the AGG controls" ON) +SET (antigrain_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) IF( agg_BUILD_DEMO OR agg_BUILD_EXAMPLES ) MESSAGE(STATUS "Force enable the platform and controls helper due to Demo / Example being build.") SET( agg_BUILD_PLATFORM ON CACHE BOOL "Build the AGG platform helper" FORCE) diff --git a/agg-src/examples/CMakeLists.txt b/agg-src/examples/CMakeLists.txt index 47e3a42e..f2ba5b7e 100644 --- a/agg-src/examples/CMakeLists.txt +++ b/agg-src/examples/CMakeLists.txt @@ -3,33 +3,33 @@ ADD_EXECUTABLE( aa_demo ${WIN32GUI} aa_demo.cpp ) -TARGET_LINK_LIBRARIES( aa_demo antigrain ) +TARGET_LINK_LIBRARIES( aa_demo antigrain::antigrain ) ADD_EXECUTABLE( aa_test ${WIN32GUI} aa_test.cpp ) -TARGET_LINK_LIBRARIES( aa_test antigrain ) +TARGET_LINK_LIBRARIES( aa_test antigrain::antigrain ) ADD_EXECUTABLE( alpha_gradient ${WIN32GUI} alpha_gradient.cpp ) -TARGET_LINK_LIBRARIES( alpha_gradient antigrain ) +TARGET_LINK_LIBRARIES( alpha_gradient antigrain::antigrain ) ADD_EXECUTABLE( alpha_mask ${WIN32GUI} alpha_mask.cpp parse_lion.cpp ) -TARGET_LINK_LIBRARIES( alpha_mask antigrain ) +TARGET_LINK_LIBRARIES( alpha_mask antigrain::antigrain ) ADD_EXECUTABLE( alpha_mask2 ${WIN32GUI} alpha_mask.cpp parse_lion.cpp ) -TARGET_LINK_LIBRARIES( alpha_mask2 antigrain ) +TARGET_LINK_LIBRARIES( alpha_mask2 antigrain::antigrain ) ADD_EXECUTABLE( alpha_mask3 ${WIN32GUI} alpha_mask.cpp @@ -38,93 +38,93 @@ ADD_EXECUTABLE( alpha_mask3 ${WIN32GUI} parse_lion.cpp ) -TARGET_LINK_LIBRARIES( alpha_mask3 antigrain ) +TARGET_LINK_LIBRARIES( alpha_mask3 antigrain::antigrain ) ADD_EXECUTABLE( bezier_div ${WIN32GUI} bezier_div.cpp interactive_polygon.cpp ) -TARGET_LINK_LIBRARIES( bezier_div antigrain ) +TARGET_LINK_LIBRARIES( bezier_div antigrain::antigrain ) ADD_EXECUTABLE( blend_color ${WIN32GUI} blend_color.cpp ) -TARGET_LINK_LIBRARIES( blend_color antigrain ) +TARGET_LINK_LIBRARIES( blend_color antigrain::antigrain ) ADD_EXECUTABLE( blur ${WIN32GUI} blur.cpp ) -TARGET_LINK_LIBRARIES( blur antigrain ) +TARGET_LINK_LIBRARIES( blur antigrain::antigrain ) ADD_EXECUTABLE( bspline ${WIN32GUI} bspline.cpp interactive_polygon.cpp ) -TARGET_LINK_LIBRARIES( bspline antigrain ) +TARGET_LINK_LIBRARIES( bspline antigrain::antigrain ) ADD_EXECUTABLE( circles ${WIN32GUI} circles.cpp ) -TARGET_LINK_LIBRARIES( circles antigrain ) +TARGET_LINK_LIBRARIES( circles antigrain::antigrain ) ADD_EXECUTABLE( component_rendering ${WIN32GUI} component_rendering.cpp ) -TARGET_LINK_LIBRARIES( component_rendering antigrain ) +TARGET_LINK_LIBRARIES( component_rendering antigrain::antigrain ) ADD_EXECUTABLE( compositing ${WIN32GUI} compositing.cpp ) -TARGET_LINK_LIBRARIES( compositing antigrain ) +TARGET_LINK_LIBRARIES( compositing antigrain::antigrain ) ADD_EXECUTABLE( compositing2 ${WIN32GUI} compositing2.cpp ) -TARGET_LINK_LIBRARIES( compositing2 antigrain ) +TARGET_LINK_LIBRARIES( compositing2 antigrain::antigrain ) ADD_EXECUTABLE( conv_contour ${WIN32GUI} conv_contour.cpp ) -TARGET_LINK_LIBRARIES( conv_contour antigrain ) +TARGET_LINK_LIBRARIES( conv_contour antigrain::antigrain ) ADD_EXECUTABLE( conv_dash_marker ${WIN32GUI} conv_dash_marker.cpp ) -TARGET_LINK_LIBRARIES( conv_dash_marker antigrain ) +TARGET_LINK_LIBRARIES( conv_dash_marker antigrain::antigrain ) ADD_EXECUTABLE( conv_stroke ${WIN32GUI} conv_stroke.cpp ) -TARGET_LINK_LIBRARIES( conv_stroke antigrain ) +TARGET_LINK_LIBRARIES( conv_stroke antigrain::antigrain ) ADD_EXECUTABLE( distortions ${WIN32GUI} distortions.cpp ) -TARGET_LINK_LIBRARIES( distortions antigrain ) +TARGET_LINK_LIBRARIES( distortions antigrain::antigrain ) ADD_EXECUTABLE( flash_rasterizer ${WIN32GUI} flash_rasterizer.cpp ) -TARGET_LINK_LIBRARIES( flash_rasterizer antigrain ) +TARGET_LINK_LIBRARIES( flash_rasterizer antigrain::antigrain ) ADD_EXECUTABLE( flash_rasterizer2 ${WIN32GUI} flash_rasterizer2.cpp ) -TARGET_LINK_LIBRARIES( flash_rasterizer2 antigrain ) +TARGET_LINK_LIBRARIES( flash_rasterizer2 antigrain::antigrain ) IF ( agg_USE_FREETYPE ) ADD_EXECUTABLE( freetype_test ${WIN32GUI} @@ -133,7 +133,7 @@ IF ( agg_USE_FREETYPE ) make_gb_poly.cpp ) - TARGET_LINK_LIBRARIES( freetype_test antigrain ) + TARGET_LINK_LIBRARIES( freetype_test antigrain::antigrain ) ENDIF ( agg_USE_FREETYPE ) @@ -141,31 +141,31 @@ ADD_EXECUTABLE( gamma_correction ${WIN32GUI} gamma_correction.cpp ) -TARGET_LINK_LIBRARIES( gamma_correction antigrain ) +TARGET_LINK_LIBRARIES( gamma_correction antigrain::antigrain ) ADD_EXECUTABLE( gamma_ctrl ${WIN32GUI} gamma_ctrl.cpp ) -TARGET_LINK_LIBRARIES( gamma_ctrl antigrain ) +TARGET_LINK_LIBRARIES( gamma_ctrl antigrain::antigrain ) ADD_EXECUTABLE( gamma_tuner ${WIN32GUI} gamma_tuner.cpp ) -TARGET_LINK_LIBRARIES( gamma_tuner antigrain ) +TARGET_LINK_LIBRARIES( gamma_tuner antigrain::antigrain ) ADD_EXECUTABLE( gouraud ${WIN32GUI} gouraud.cpp ) -TARGET_LINK_LIBRARIES( gouraud antigrain ) +TARGET_LINK_LIBRARIES( gouraud antigrain::antigrain ) ADD_EXECUTABLE( gouraud_mesh ${WIN32GUI} gouraud_mesh.cpp ) -TARGET_LINK_LIBRARIES( gouraud_mesh antigrain ) +TARGET_LINK_LIBRARIES( gouraud_mesh antigrain::antigrain ) IF ( agg_USE_GPC ) ADD_EXECUTABLE( gpc_test ${WIN32GUI} @@ -174,7 +174,7 @@ IF ( agg_USE_GPC ) make_gb_poly.cpp ) - TARGET_LINK_LIBRARIES( gpc_test antigrain ) + TARGET_LINK_LIBRARIES( gpc_test antigrain::antigrain ) ENDIF ( agg_USE_GPC ) @@ -182,13 +182,13 @@ ADD_EXECUTABLE( gradients ${WIN32GUI} gradients.cpp ) -TARGET_LINK_LIBRARIES( gradients antigrain ) +TARGET_LINK_LIBRARIES( gradients antigrain::antigrain ) ADD_EXECUTABLE( gradient_focal ${WIN32GUI} gradient_focal.cpp ) -TARGET_LINK_LIBRARIES( gradient_focal antigrain ) +TARGET_LINK_LIBRARIES( gradient_focal antigrain::antigrain ) ADD_EXECUTABLE( gradients_contour ${WIN32GUI} gradients_contour.cpp @@ -197,135 +197,135 @@ ADD_EXECUTABLE( gradients_contour ${WIN32GUI} parse_lion.cpp ) -TARGET_LINK_LIBRARIES( gradients_contour antigrain ) +TARGET_LINK_LIBRARIES( gradients_contour antigrain::antigrain ) ADD_EXECUTABLE( graph_test ${WIN32GUI} graph_test.cpp ) -TARGET_LINK_LIBRARIES( graph_test antigrain ) +TARGET_LINK_LIBRARIES( graph_test antigrain::antigrain ) ADD_EXECUTABLE( idea ${WIN32GUI} idea.cpp ) -TARGET_LINK_LIBRARIES( idea antigrain ) +TARGET_LINK_LIBRARIES( idea antigrain::antigrain ) ADD_EXECUTABLE( image1 ${WIN32GUI} image1.cpp ) -TARGET_LINK_LIBRARIES( image1 antigrain ) +TARGET_LINK_LIBRARIES( image1 antigrain::antigrain ) ADD_EXECUTABLE( image_alpha ${WIN32GUI} image_alpha.cpp ) -TARGET_LINK_LIBRARIES( image_alpha antigrain ) +TARGET_LINK_LIBRARIES( image_alpha antigrain::antigrain ) ADD_EXECUTABLE( image_filters ${WIN32GUI} image_filters.cpp ) -TARGET_LINK_LIBRARIES( image_filters antigrain ) +TARGET_LINK_LIBRARIES( image_filters antigrain::antigrain ) ADD_EXECUTABLE( image_filters2 ${WIN32GUI} image_filters2.cpp ) -TARGET_LINK_LIBRARIES( image_filters2 antigrain ) +TARGET_LINK_LIBRARIES( image_filters2 antigrain::antigrain ) ADD_EXECUTABLE( image_fltr_graph ${WIN32GUI} image_fltr_graph.cpp ) -TARGET_LINK_LIBRARIES( image_fltr_graph antigrain ) +TARGET_LINK_LIBRARIES( image_fltr_graph antigrain::antigrain ) ADD_EXECUTABLE( image_perspective ${WIN32GUI} image_perspective.cpp interactive_polygon.cpp ) -TARGET_LINK_LIBRARIES( image_perspective antigrain ) +TARGET_LINK_LIBRARIES( image_perspective antigrain::antigrain ) ADD_EXECUTABLE( image_resample ${WIN32GUI} image_resample.cpp interactive_polygon.cpp ) -TARGET_LINK_LIBRARIES( image_resample antigrain ) +TARGET_LINK_LIBRARIES( image_resample antigrain::antigrain ) ADD_EXECUTABLE( image_transforms ${WIN32GUI} image_transforms.cpp ) -TARGET_LINK_LIBRARIES( image_transforms antigrain ) +TARGET_LINK_LIBRARIES( image_transforms antigrain::antigrain ) ADD_EXECUTABLE( line_patterns ${WIN32GUI} line_patterns.cpp ) -TARGET_LINK_LIBRARIES( line_patterns antigrain ) +TARGET_LINK_LIBRARIES( line_patterns antigrain::antigrain ) ADD_EXECUTABLE( line_patterns_clip ${WIN32GUI} line_patterns_clip.cpp ) -TARGET_LINK_LIBRARIES( line_patterns_clip antigrain ) +TARGET_LINK_LIBRARIES( line_patterns_clip antigrain::antigrain ) ADD_EXECUTABLE( lion ${WIN32GUI} lion.cpp parse_lion.cpp ) -TARGET_LINK_LIBRARIES( lion antigrain ) +TARGET_LINK_LIBRARIES( lion antigrain::antigrain ) ADD_EXECUTABLE( lion_lens ${WIN32GUI} lion_lens.cpp parse_lion.cpp ) -TARGET_LINK_LIBRARIES( lion_lens antigrain ) +TARGET_LINK_LIBRARIES( lion_lens antigrain::antigrain ) ADD_EXECUTABLE( lion_outline ${WIN32GUI} lion_outline.cpp parse_lion.cpp ) -TARGET_LINK_LIBRARIES( lion_outline antigrain ) +TARGET_LINK_LIBRARIES( lion_outline antigrain::antigrain ) ADD_EXECUTABLE( mol_view ${WIN32GUI} mol_view.cpp ) -TARGET_LINK_LIBRARIES( mol_view antigrain ) +TARGET_LINK_LIBRARIES( mol_view antigrain::antigrain ) ADD_EXECUTABLE( multi_clip ${WIN32GUI} multi_clip.cpp parse_lion.cpp ) -TARGET_LINK_LIBRARIES( multi_clip antigrain ) +TARGET_LINK_LIBRARIES( multi_clip antigrain::antigrain ) ADD_EXECUTABLE( pattern_fill ${WIN32GUI} pattern_fill.cpp ) -TARGET_LINK_LIBRARIES( pattern_fill antigrain ) +TARGET_LINK_LIBRARIES( pattern_fill antigrain::antigrain ) ADD_EXECUTABLE( pattern_perspective ${WIN32GUI} pattern_perspective.cpp interactive_polygon.cpp ) -TARGET_LINK_LIBRARIES( pattern_perspective antigrain ) +TARGET_LINK_LIBRARIES( pattern_perspective antigrain::antigrain ) ADD_EXECUTABLE( pattern_resample ${WIN32GUI} pattern_resample.cpp interactive_polygon.cpp ) -TARGET_LINK_LIBRARIES( pattern_resample antigrain ) +TARGET_LINK_LIBRARIES( pattern_resample antigrain::antigrain ) ADD_EXECUTABLE( perspective ${WIN32GUI} perspective.cpp @@ -333,50 +333,50 @@ ADD_EXECUTABLE( perspective ${WIN32GUI} parse_lion.cpp ) -TARGET_LINK_LIBRARIES( perspective antigrain ) +TARGET_LINK_LIBRARIES( perspective antigrain::antigrain ) ADD_EXECUTABLE( polymorphic_renderer ${WIN32GUI} polymorphic_renderer.cpp ) -TARGET_LINK_LIBRARIES( polymorphic_renderer antigrain ) +TARGET_LINK_LIBRARIES( polymorphic_renderer antigrain::antigrain ) ADD_EXECUTABLE( rasterizers ${WIN32GUI} rasterizers.cpp ) -TARGET_LINK_LIBRARIES( rasterizers antigrain ) +TARGET_LINK_LIBRARIES( rasterizers antigrain::antigrain ) ADD_EXECUTABLE( rasterizers2 ${WIN32GUI} rasterizers2.cpp ) -TARGET_LINK_LIBRARIES( rasterizers2 antigrain ) +TARGET_LINK_LIBRARIES( rasterizers2 antigrain::antigrain ) ADD_EXECUTABLE( rasterizer_compound ${WIN32GUI} rasterizer_compound.cpp ) -TARGET_LINK_LIBRARIES( rasterizer_compound antigrain ) +TARGET_LINK_LIBRARIES( rasterizer_compound antigrain::antigrain ) ADD_EXECUTABLE( raster_text ${WIN32GUI} raster_text.cpp ) -TARGET_LINK_LIBRARIES( raster_text antigrain ) +TARGET_LINK_LIBRARIES( raster_text antigrain::antigrain ) ADD_EXECUTABLE( rounded_rect ${WIN32GUI} rounded_rect.cpp ) -TARGET_LINK_LIBRARIES( rounded_rect antigrain ) +TARGET_LINK_LIBRARIES( rounded_rect antigrain::antigrain ) ADD_EXECUTABLE( scanline_boolean ${WIN32GUI} scanline_boolean.cpp interactive_polygon.cpp ) -TARGET_LINK_LIBRARIES( scanline_boolean antigrain ) +TARGET_LINK_LIBRARIES( scanline_boolean antigrain::antigrain ) ADD_EXECUTABLE( scanline_boolean2 ${WIN32GUI} scanline_boolean2.cpp @@ -384,14 +384,14 @@ ADD_EXECUTABLE( scanline_boolean2 ${WIN32GUI} make_gb_poly.cpp ) -TARGET_LINK_LIBRARIES( scanline_boolean2 antigrain ) +TARGET_LINK_LIBRARIES( scanline_boolean2 antigrain::antigrain ) ADD_EXECUTABLE( simple_blur ${WIN32GUI} simple_blur.cpp parse_lion.cpp ) -TARGET_LINK_LIBRARIES( simple_blur antigrain ) +TARGET_LINK_LIBRARIES( simple_blur antigrain::antigrain ) IF(WIN32) @@ -400,20 +400,20 @@ IF(WIN32) interactive_polygon.cpp ) - TARGET_LINK_LIBRARIES( trans_curve1 antigrain ) + TARGET_LINK_LIBRARIES( trans_curve1 antigrain::antigrain ) ADD_EXECUTABLE( trans_curve2 ${WIN32GUI} trans_curve2.cpp interactive_polygon.cpp ) - TARGET_LINK_LIBRARIES( trans_curve2 antigrain ) + TARGET_LINK_LIBRARIES( trans_curve2 antigrain::antigrain ) ADD_EXECUTABLE( truetype_test ${WIN32GUI} truetype_test.cpp ) - TARGET_LINK_LIBRARIES( truetype_test antigrain ) + TARGET_LINK_LIBRARIES( truetype_test antigrain::antigrain ) ENDIF(WIN32) @@ -421,7 +421,7 @@ ADD_EXECUTABLE( trans_polar ${WIN32GUI} trans_polar.cpp ) -TARGET_LINK_LIBRARIES( trans_polar antigrain ) +TARGET_LINK_LIBRARIES( trans_polar antigrain::antigrain ) IF ( agg_USE_EXPAT ) ADD_EXECUTABLE( svg_test ${WIN32GUI} @@ -435,7 +435,7 @@ IF ( agg_USE_EXPAT ) ./svg_viewer/agg_svg_path_tokenizer.h ) - TARGET_LINK_LIBRARIES( svg_test antigrain ) + TARGET_LINK_LIBRARIES( svg_test antigrain::antigrain ) ENDIF ( agg_USE_EXPAT ) @@ -451,7 +451,7 @@ IF(WIN32) ) - TARGET_LINK_LIBRARIES( pure_api antigrain ) + TARGET_LINK_LIBRARIES( pure_api antigrain::antigrain ) ENDIF(WIN32) @@ -460,6 +460,6 @@ IF( agg_USE_AGG2D ) agg2d_demo.cpp ) - TARGET_LINK_LIBRARIES( agg2_demo antigrain ) + TARGET_LINK_LIBRARIES( agg2_demo antigrain::antigrain ) ENDIF( agg_USE_AGG2D ) diff --git a/agg-src/font_freetype/CMakeLists.txt b/agg-src/font_freetype/CMakeLists.txt index d2523c99..fda6fe15 100644 --- a/agg-src/font_freetype/CMakeLists.txt +++ b/agg-src/font_freetype/CMakeLists.txt @@ -4,15 +4,16 @@ CMAKE_MINIMUM_REQUIRED( VERSION 3.0 ) FIND_PACKAGE( Freetype CONFIG REQUIRED ) -ADD_LIBRARY( ${PROJECT_NAME} +ADD_LIBRARY( ${PROJECT_NAME} STATIC agg_font_freetype.h agg_font_freetype.cpp) TARGET_INCLUDE_DIRECTORIES( ${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) TARGET_LINK_LIBRARIES( ${PROJECT_NAME} PUBLIC freetype antigrain ) -TARGET_LINK_LIBRARIES( antigrain INTERFACE ${PROJECT_NAME} ) - TARGET_COMPILE_DEFINITIONS( ${PROJECT_NAME} PUBLIC AGG_USE_FREETYPE ) +ADD_LIBRARY( antigrain::freetypefont ALIAS ${PROJECT_NAME} ) +TARGET_LINK_LIBRARIES( antigrain_internal INTERFACE antigrain::freetypefont ) + INSTALL( TARGETS ${PROJECT_NAME} DESTINATION lib ) INSTALL( FILES ${CMAKE_CURRENT_SOURCE_DIR}/agg_font_freetype.h DESTINATION agg/font_freetype ) diff --git a/agg-src/font_win32_tt/CMakeLists.txt b/agg-src/font_win32_tt/CMakeLists.txt index aca278f5..2f34cc36 100644 --- a/agg-src/font_win32_tt/CMakeLists.txt +++ b/agg-src/font_win32_tt/CMakeLists.txt @@ -2,13 +2,15 @@ PROJECT( agg_font_win32 ) CMAKE_MINIMUM_REQUIRED( VERSION 3.0 ) -ADD_LIBRARY( ${PROJECT_NAME} +ADD_LIBRARY( ${PROJECT_NAME} STATIC agg_font_win32_tt.h agg_font_win32_tt.cpp) TARGET_INCLUDE_DIRECTORIES( ${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) TARGET_LINK_LIBRARIES( ${PROJECT_NAME} PUBLIC antigrain ) -TARGET_LINK_LIBRARIES( antigrain INTERFACE ${PROJECT_NAME} ) + +ADD_LIBRARY( antigrain::font_win32 ALIAS ${PROJECT_NAME}) +TARGET_LINK_LIBRARIES( antigrain_internal INTERFACE antigrain::font_win32 ) INSTALL( TARGETS ${PROJECT_NAME} DESTINATION lib ) INSTALL( FILES ${CMAKE_CURRENT_SOURCE_DIR}/agg_font_win32_tt.h DESTINATION agg/font_win32_tt ) diff --git a/agg-src/gpc/CMakeLists.txt b/agg-src/gpc/CMakeLists.txt index 508a383a..a351d572 100644 --- a/agg-src/gpc/CMakeLists.txt +++ b/agg-src/gpc/CMakeLists.txt @@ -4,17 +4,16 @@ CMAKE_MINIMUM_REQUIRED( VERSION 3.0 ) # boolean operations library GPC -ADD_LIBRARY( ${PROJECT_NAME} +ADD_LIBRARY( ${PROJECT_NAME} STATIC gpc.c gpc.h ) TARGET_INCLUDE_DIRECTORIES( ${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) - TARGET_COMPILE_DEFINITIONS( ${PROJECT_NAME} PUBLIC AGG_USE_GPC ) -TARGET_LINK_LIBRARIES( antigrain INTERFACE ${PROJECT_NAME} ) -TARGET_LINK_LIBRARIES( ${PROJECT_NAME} PRIVATE antigrain ) +ADD_LIBRARY( antigrain::gpcbool ALIAS ${PROJECT_NAME}) +TARGET_LINK_LIBRARIES( antigrain_internal INTERFACE antigrain::gpcbool ) INSTALL( TARGETS ${PROJECT_NAME} DESTINATION lib ) INSTALL( FILES gpc.h DESTINATION agg/gpc ) diff --git a/agg-src/myapp/CMakeLists.txt b/agg-src/myapp/CMakeLists.txt index 35108f3c..660f6fef 100644 --- a/agg-src/myapp/CMakeLists.txt +++ b/agg-src/myapp/CMakeLists.txt @@ -1,37 +1,20 @@ PROJECT( MyAggApp ) -# additional are modified Find routines -SET ( CMAKE_MODULE_PATH "${MyAggApp_BINARY_DIR}" ) - CMAKE_MINIMUM_REQUIRED( VERSION 3.0 ) - -################################################## -# Set all includes, flags, libraries, related to Agg -################################################## - -FIND_PACKAGE( Agg ) -IF( AGG_FOUND ) - #normally the next is needed, but since this very file is in Agg its source, all is already in place - #INCLUDE(${AGG_USE_FILE}) -ELSE( AGG_FOUND ) - MESSAGE( "AGG library was not found" ) -ENDIF( AGG_FOUND ) - - ADD_EXECUTABLE( my_demo ${WIN32GUI} my_demo.cpp ) -TARGET_LINK_LIBRARIES ( my_demo antigrain) +TARGET_LINK_LIBRARIES ( my_demo antigrain::antigrain ) IF( agg_USE_AGG2D ) ADD_EXECUTABLE( agg2d_demo ${WIN32GUI} agg2d_demo.cpp ) - TARGET_LINK_LIBRARIES ( agg2d_demo antigrain) + TARGET_LINK_LIBRARIES ( agg2d_demo antigrain::antigrain ) ENDIF( agg_USE_AGG2D ) # for the moment this decides the platform code. diff --git a/agg-src/src/CMakeLists.txt b/agg-src/src/CMakeLists.txt index 58eaaac0..fec83a09 100644 --- a/agg-src/src/CMakeLists.txt +++ b/agg-src/src/CMakeLists.txt @@ -127,7 +127,7 @@ SET( antigrain_HEADERS ${antigrain_SOURCE_DIR}/include/agg_span_gradient_image.h ) -ADD_LIBRARY( antigrain +ADD_LIBRARY( antigrain STATIC agg_arc.cpp agg_arrowhead.cpp @@ -157,6 +157,9 @@ ADD_LIBRARY( antigrain ${antigrain_HEADERS} ) +ADD_LIBRARY ( antigrain_internal INTERFACE ) +ADD_LIBRARY( antigrain::antigrain ALIAS antigrain_internal ) +TARGET_LINK_LIBRARIES( antigrain_internal INTERFACE antigrain ) #controls code for interactive modifying samples IF ( agg_BUILD_CONTROLS ) @@ -192,7 +195,7 @@ IF ( agg_USE_AGG2D ) OPTION( agg_USE_AGG2D_FREETYPE "Agg 2D graphical context uses freetype" OFF) - ADD_LIBRARY( agg2d + ADD_LIBRARY( agg2d STATIC ../agg2d/agg2d.cpp ../agg2d/agg2d.h ) @@ -201,8 +204,10 @@ IF ( agg_USE_AGG2D ) TARGET_COMPILE_DEFINITIONS( agg2d PUBLIC AGG_USE_AGG2D ) - TARGET_LINK_LIBRARIES( agg2d PRIVATE antigrain ) - TARGET_LINK_LIBRARIES( antigrain INTERFACE agg2d ) + TARGET_LINK_LIBRARIES( agg2d PUBLIC antigrain freetypefont ) + + ADD_LIBRARY( antigrain::agg2d ALIAS agg2d ) + TARGET_LINK_LIBRARIES( antigrain_internal INTERFACE antigrain::agg2d ) INSTALL( TARGETS agg2d DESTINATION lib ) INSTALL( FILES ../agg2d/agg2d.h DESTINATION agg/agg2d ) diff --git a/agg-src/src/ctrl/CMakeLists.txt b/agg-src/src/ctrl/CMakeLists.txt index dd2d3e5d..71e125a5 100644 --- a/agg-src/src/ctrl/CMakeLists.txt +++ b/agg-src/src/ctrl/CMakeLists.txt @@ -4,19 +4,19 @@ CMAKE_MINIMUM_REQUIRED( VERSION 3.0 ) SET( controls_HEADERS - ${CMAKE_CURRENT_SOURCE_DIR}/../../include/ctrl/agg_slider_ctrl.h - ${CMAKE_CURRENT_SOURCE_DIR}/../../include/ctrl/agg_spline_ctrl.h - ${CMAKE_CURRENT_SOURCE_DIR}/../../include/ctrl/agg_scale_ctrl.h - ${CMAKE_CURRENT_SOURCE_DIR}/../../include/ctrl/agg_rbox_ctrl.h - ${CMAKE_CURRENT_SOURCE_DIR}/../../include/ctrl/agg_polygon_ctrl.h - ${CMAKE_CURRENT_SOURCE_DIR}/../../include/ctrl/agg_gamma_spline.h - ${CMAKE_CURRENT_SOURCE_DIR}/../../include/ctrl/agg_gamma_ctrl.h - ${CMAKE_CURRENT_SOURCE_DIR}/../../include/ctrl/agg_ctrl.h - ${CMAKE_CURRENT_SOURCE_DIR}/../../include/ctrl/agg_cbox_ctrl.h - ${CMAKE_CURRENT_SOURCE_DIR}/../../include/ctrl/agg_bezier_ctrl.h + ${antigrain_SOURCE_DIR}/include/ctrl/agg_slider_ctrl.h + ${antigrain_SOURCE_DIR}/include/ctrl/agg_spline_ctrl.h + ${antigrain_SOURCE_DIR}/include/ctrl/agg_scale_ctrl.h + ${antigrain_SOURCE_DIR}/include/ctrl/agg_rbox_ctrl.h + ${antigrain_SOURCE_DIR}/include/ctrl/agg_polygon_ctrl.h + ${antigrain_SOURCE_DIR}/include/ctrl/agg_gamma_spline.h + ${antigrain_SOURCE_DIR}/include/ctrl/agg_gamma_ctrl.h + ${antigrain_SOURCE_DIR}/include/ctrl/agg_ctrl.h + ${antigrain_SOURCE_DIR}/include/ctrl/agg_cbox_ctrl.h + ${antigrain_SOURCE_DIR}/include/ctrl/agg_bezier_ctrl.h ) -ADD_LIBRARY( controls +ADD_LIBRARY( controls STATIC agg_spline_ctrl.cpp agg_slider_ctrl.cpp agg_scale_ctrl.cpp @@ -29,8 +29,10 @@ ADD_LIBRARY( controls ${controls_HEADERS} ) TARGET_INCLUDE_DIRECTORIES( controls PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) -TARGET_LINK_LIBRARIES( controls PRIVATE antigrain ) -TARGET_LINK_LIBRARIES( antigrain INTERFACE controls ) +TARGET_LINK_LIBRARIES( controls PUBLIC antigrain ) + +ADD_LIBRARY( antigrain::controls ALIAS ${PROJECT_NAME} ) +TARGET_LINK_LIBRARIES( antigrain_internal INTERFACE antigrain::controls ) INSTALL( FILES ${controls_HEADERS} DESTINATION agg/include/ctrl ) INSTALL( TARGETS controls DESTINATION lib ) diff --git a/agg-src/src/platform/CMakeLists.txt b/agg-src/src/platform/CMakeLists.txt index 1852d54a..c6804249 100644 --- a/agg-src/src/platform/CMakeLists.txt +++ b/agg-src/src/platform/CMakeLists.txt @@ -6,7 +6,7 @@ SET( platform_HEADERS ) IF(WIN32) - ADD_LIBRARY( ${PROJECT_NAME} + ADD_LIBRARY( ${PROJECT_NAME} STATIC win32/agg_win32_bmp.cpp win32/agg_platform_support.cpp ${platform_HEADERS} @@ -14,13 +14,13 @@ IF(WIN32) ENDIF(WIN32) IF(UNIX) - ADD_LIBRARY( ${PROJECT_NAME} + ADD_LIBRARY( ${PROJECT_NAME} STATIC X11/agg_platform_support.cpp ${platform_HEADERS} ) ENDIF(UNIX) IF(APPLE) - ADD_LIBRARY( ${PROJECT_NAME} + ADD_LIBRARY( ${PROJECT_NAME} STATIC mac/agg_mac_pmap.cpp mac/agg_platform_support.cpp ${platform_HEADERS} @@ -34,19 +34,25 @@ ENDIF(APPLE) IF ( agg_USE_SDL_PLATFORM ) FIND_PACKAGE( SDL REQUIRED ) - ADD_LIBRARY( sdlplatform + ADD_LIBRARY( sdlplatform STATIC sdl/agg_platform_support.cpp ${platform_HEADERS} ) TARGET_INCLUDE_DIRECTORIES( sdlplatform PUBLIC ${SDL_INCLUDE_DIR}) TARGET_LINK_LIBRARIES( sdlplatform PUBLIC ${SDL_LIBRARY}) - TARGET_LINK_LIBRARIES( sdlplatform PRIVATE antigrain) - TARGET_LINK_LIBRARIES( antigrain INTERFACE sdlplatform) + TARGET_LINK_LIBRARIES( sdlplatform PUBLIC antigrain) + + ADD_LIBRARY(antigrain::sdlplatform ALIAS sdlplatform) + TARGET_LINK_LIBRARIES( antigrain_internal INTERFACE antigrain::sdlplatform ) + INSTALL( TARGETS sdlplatform DESTINATION lib ) ENDIF( SDL_FOUND ) -TARGET_LINK_LIBRARIES( ${PROJECT_NAME} PRIVATE antigrain) -TARGET_LINK_LIBRARIES( antigrain INTERFACE platform) +TARGET_LINK_LIBRARIES( ${PROJECT_NAME} PUBLIC antigrain ) + +ADD_LIBRARY( antigrain::platform ALIAS ${PROJECT_NAME}) +TARGET_LINK_LIBRARIES( antigrain_internal INTERFACE antigrain::platform ) + INSTALL( FILES ${platform_HEADERS} DESTINATION agg/include/platform ) INSTALL( TARGETS ${PROJECT_NAME} DESTINATION lib )