]> granicus.if.org Git - graphviz/commitdiff
create an object library with all ortho object files for CMake
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 1 Jun 2021 16:30:05 +0000 (18:30 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 14 Jul 2021 09:18:43 +0000 (11:18 +0200)
This is a prepration for being able to force them to be included in
the gvc shared library in an upcoming commit in this series.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2096.

lib/ortho/CMakeLists.txt

index 14d7a15d41dc98df6643ac2642f55571cce7ee58..79bca2dabe99ee11fc696b76fd1b4823d0860587 100644 (file)
@@ -2,7 +2,7 @@ if (with_ortho)
 
 add_definitions(-D_BLD_gvc=1)
 
-add_library(ortho STATIC
+add_library(ortho_obj OBJECT
     # Header files
     fPQ.h
     maze.h
@@ -23,7 +23,7 @@ add_library(ortho STATIC
     trapezoid.c
 )
 
-target_include_directories(ortho PRIVATE
+target_include_directories(ortho_obj PRIVATE
     ${GRAPHVIZ_LIB_DIR}
     ${GRAPHVIZ_LIB_DIR}/cdt
     ${GRAPHVIZ_LIB_DIR}/cgraph
@@ -33,4 +33,8 @@ target_include_directories(ortho PRIVATE
     ${GRAPHVIZ_LIB_DIR}/pathplan
 )
 
+add_library(ortho STATIC
+    $<TARGET_OBJECTS:ortho_obj>
+)
+
 endif (with_ortho)