From 9d5f54d51a92430e1ca83ce7c0fc5a16b4d27a38 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 3 Sep 2017 11:51:39 +0200 Subject: [PATCH] Fixed non-Ruby build where DRC is not available. --- src/klayout_main/klayout.cc | 2 ++ src/unit_tests/unit_test_main.cc | 2 ++ src/with_all_libs.pri | 13 ++++++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/klayout_main/klayout.cc b/src/klayout_main/klayout.cc index fcd5d2c8e..fdffba16e 100644 --- a/src/klayout_main/klayout.cc +++ b/src/klayout_main/klayout.cc @@ -40,7 +40,9 @@ #include "libForceLink.h" #include "antForceLink.h" #include "imgForceLink.h" +#ifdef HAVE_RUBY #include "drcForceLink.h" +#endif #include #include diff --git a/src/unit_tests/unit_test_main.cc b/src/unit_tests/unit_test_main.cc index a06f23432..d936c6930 100644 --- a/src/unit_tests/unit_test_main.cc +++ b/src/unit_tests/unit_test_main.cc @@ -49,7 +49,9 @@ // required to force linking of the "ext", "lib" and "drc" module #include "extForceLink.h" #include "libForceLink.h" +#if defined(HAVE_RUBY) #include "drcForceLink.h" +#endif static int main_cont (int argc, char **argv); diff --git a/src/with_all_libs.pri b/src/with_all_libs.pri index 42a093fae..02cb4d3fc 100644 --- a/src/with_all_libs.pri +++ b/src/with_all_libs.pri @@ -1,8 +1,8 @@ -INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LYM_INC $$LAYBASIC_INC $$LAY_INC $$ANT_INC $$IMG_INC $$EDT_INC $$DRC_INC $$EXT_INC $$LIB_INC $$RBA_INC $$PYA_INC $$VERSION_INC -DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LYM_INC $$LAYBASIC_INC $$LAY_INC $$ANT_INC $$IMG_INC $$EDT_INC $$DRC_INC $$EXT_INC $$LIB_INC $$RBA_INC $$PYA_INC $$VERSION_INC +INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LYM_INC $$LAYBASIC_INC $$LAY_INC $$ANT_INC $$IMG_INC $$EDT_INC $$EXT_INC $$LIB_INC $$RBA_INC $$PYA_INC $$VERSION_INC +DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LYM_INC $$LAYBASIC_INC $$LAY_INC $$ANT_INC $$IMG_INC $$EDT_INC $$EXT_INC $$LIB_INC $$RBA_INC $$PYA_INC $$VERSION_INC -LIBS += $$PYTHONLIBFILE $$RUBYLIBFILE -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_db -lklayout_rdb -lklayout_lym -lklayout_laybasic -lklayout_lay -lklayout_ant -lklayout_img -lklayout_edt -lklayout_drc -lklayout_ext -lklayout_lib +LIBS += $$PYTHONLIBFILE $$RUBYLIBFILE -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_db -lklayout_rdb -lklayout_lym -lklayout_laybasic -lklayout_lay -lklayout_ant -lklayout_img -lklayout_edt -lklayout_ext -lklayout_lib # Note: this accounts for UI-generated headers placed into the output folders in # shadow builds: @@ -26,3 +26,10 @@ equals(HAVE_PYTHON, "1") { } else { LIBS += -lklayout_pyastub } + +equals(HAVE_RUBY, "1") { + # DRC is only available with Ruby + INCLUDEPATH += $$DRC_INC + DEPENDPATH += $$DRC_INC + LIBS += -lklayout_drc +}