]> granicus.if.org Git - graphviz/commitdiff
further disambiguate inclusion of colortbl.h
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 17 Aug 2020 03:44:02 +0000 (20:44 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 10 Sep 2020 02:26:51 +0000 (19:26 -0700)
This generated header needs some extra acrobatics. Related to #1785.

lib/common/CMakeLists.txt
lib/common/colxlate.c

index 5fee446c0f2432535b5c491be7666e97e421b32b..7e04133e69cf3dea9922bcf7a93f6f3b7bef61d0 100644 (file)
@@ -39,10 +39,11 @@ add_custom_command(
     COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/generate_color_lib.cmake
 )
 add_custom_command(
-    OUTPUT colortbl.h
+    OUTPUT common/colortbl.h
     DEPENDS color_lib
+    COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/common"
     COMMAND ${AWK_EXECUTABLE} -f ${TOP_SOURCE_DIR}/awk/colortbl.awk
-            ${CMAKE_CURRENT_BINARY_DIR}/color_lib > ${CMAKE_CURRENT_BINARY_DIR}/colortbl.h
+            ${CMAKE_CURRENT_BINARY_DIR}/color_lib > ${CMAKE_CURRENT_BINARY_DIR}/common/colortbl.h
 )
 
 # Generate ps_font_equiv.h from sources
@@ -66,7 +67,7 @@ add_library(common STATIC
     arith.h
     color.h
     colorprocs.h
-    colortbl.h
+    ${CMAKE_CURRENT_BINARY_DIR}/common/colortbl.h
     const.h
     entities.h
     geom.h
index 74e7169a193afcd4aba7ec84791c485cf507950e..429379e0a92e0803f4a44bb9f092d45021ca0260 100644 (file)
@@ -25,7 +25,7 @@
 #include <common/arith.h>
 #include <common/color.h>
 #include <common/colorprocs.h>
-#include "colortbl.h"
+#include <common/colortbl.h>
 #include <common/memory.h>
 #include <cgraph/strcasecmp.h>