summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2017-02-17 16:44:47 -0500
committerNat Goodspeed <nat@lindenlab.com>2017-02-17 16:44:47 -0500
commit56d04963d46bda05d118764e3914740c318b09cf (patch)
tree0f3ba1481fbd72a27f1cab9e30d3644d843a2826
parent2428b484e3a6ce23eaf29bd93579252e8e303f69 (diff)
DRTVWR-418: Fix CMake syntax for Havok.cmake refactoring.
-rw-r--r--indra/cmake/Havok.cmake25
1 files changed, 12 insertions, 13 deletions
diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake
index d67d3df9f3..243b9f5e34 100644
--- a/indra/cmake/Havok.cmake
+++ b/indra/cmake/Havok.cmake
@@ -50,25 +50,24 @@ unset(HK_RELEASE_LIBRARIES)
unset(HK_RELWITHDEBINFO_LIBRARIES)
if (DEBUG_PREBUILT)
- # DEBUG_EXEC() reports each execute_process() before invoking
- function(DEBUG_EXEC)
- message(STATUS ARGN)
- execute_process(ARGN)
- endfunction(DEBUG_EXEC)
# DEBUG_MESSAGE() displays debugging message
function(DEBUG_MESSAGE)
- message(STATUS ARGN)
+ # prints message args separated by semicolons rather than spaces,
+ # but making it pretty is a lot more work
+ message(STATUS "${ARGN}")
endfunction(DEBUG_MESSAGE)
else (DEBUG_PREBUILT)
- # without DEBUG_PREBUILT, DEBUG_EXEC() is just execute_process()
- function(DEBUG_EXEC)
- execute_process(ARGN)
- endfunction(DEBUG_EXEC)
# without DEBUG_PREBUILT, DEBUG_MESSAGE() is a no-op
function(DEBUG_MESSAGE)
endfunction(DEBUG_MESSAGE)
endif (DEBUG_PREBUILT)
+# DEBUG_EXEC() reports each execute_process() before invoking
+function(DEBUG_EXEC)
+ DEBUG_MESSAGE(${ARGN})
+ execute_process(COMMAND ${ARGN})
+endfunction(DEBUG_EXEC)
+
# *TODO: Figure out why we need to extract like this...
foreach(HAVOK_LIB ${HAVOK_LIBS})
find_library(HAVOK_DEBUG_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_DEBUG_LIBRARY_PATH})
@@ -89,10 +88,10 @@ foreach(HAVOK_LIB ${HAVOK_LIBS})
if(${PREBUILD_TRACKING_DIR}/havok_source_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0)
DEBUG_MESSAGE("Extracting ${HAVOK_LIB}...")
- foreach(lib debug_dir release_dir relwithdebinfo_dir)
- DEBUG_EXEC("mkdir" lib)
+ foreach(lib ${debug_dir} ${release_dir} ${relwithdebinfo_dir})
+ DEBUG_EXEC("mkdir" ${lib})
DEBUG_EXEC("ar" "-xv" "../lib${HAVOK_LIB}.a"
- WORKING_DIRECTORY lib)
+ WORKING_DIRECTORY ${lib})
endforeach(lib)
# Just assume success for now.