Revision: 76036
http://sourceforge.net/p/brlcad/code/76036
Author: starseeker
Date: 2020-06-05 18:07:14 +0000 (Fri, 05 Jun 2020)
Log Message:
-----------
Switch the database build cmake script to using the BIN_DIR variable to deduce
the root dir.
Modified Paths:
--------------
brlcad/trunk/db/conv_run.cmake.in
Modified: brlcad/trunk/db/conv_run.cmake.in
===================================================================
--- brlcad/trunk/db/conv_run.cmake.in 2020-06-05 17:59:25 UTC (rev 76035)
+++ brlcad/trunk/db/conv_run.cmake.in 2020-06-05 18:07:14 UTC (rev 76036)
@@ -1,6 +1,7 @@
string(REPLACE "\\" "" GCV_EXEC "${EXEC}")
set(INPUT_FILE "@INPUT_FILE@")
set(OUTPUT_FILE "@OUTPUT_FILE@")
+set(BIN_DIR "@BIN_DIR@")
# NOTE: OUTPUT_FILE needs to be defined in terms of a path relative to the root
# of the build diretory, not as an absolute path. Since that root may change
@@ -11,11 +12,10 @@
message(FATAL_ERROR "Absoute output file path \"${OUTPUT_FILE}\" supplied
for conversion of \"${INPUT_FILE}\" - path must be relative.")
endif ("${OF_ABS}" STREQUAL "${OUTPUT_FILE}")
-# Because the build directory changes at runtime in multiconfig builds, we
-# need to deduce its current value from GCV_EXEC.
-# TODO - this breaks if the bin directory is more than one deep...
+# Because the build directory changes at runtime in multiconfig builds, we
+# need to deduce its current value from GCV_EXEC.
get_filename_component(CBDIR "${GCV_EXEC}" DIRECTORY)
-get_filename_component(CROOT "${CBDIR}" DIRECTORY)
+string(REGEX REPLACE "${BIN_DIR}$" "" CROOT "${CBDIR}")
# BRLCAD_ROOT is the hammer that makes certain we are running
# things found in the build directory.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits