KWSys: Do not trust EXECUTABLE_OUTPUT_PATH for ProcessFwd9x encoding

Set target property RUNTIME_OUTPUT_DIRECTORY explicitly on ProcessFwd9x
and EncodeExecutable so that we know exactly where the executables will
exist on disk.
This commit is contained in:
Brad King 2011-03-23 17:09:46 -04:00
parent 7afcb81037
commit 29487bacea
1 changed files with 4 additions and 8 deletions

View File

@ -847,23 +847,19 @@ IF(KWSYS_USE_Process)
# encode it into a C file.
ADD_EXECUTABLE(${KWSYS_NAMESPACE}ProcessFwd9x ProcessFwd9x.c)
ADD_EXECUTABLE(${KWSYS_NAMESPACE}EncodeExecutable EncodeExecutable.c)
SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}EncodeExecutable PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY LABELS ${KWSYS_LABELS_EXE})
SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}EncodeExecutable PROPERTY LABELS ${KWSYS_LABELS_EXE})
# Construct the location of the executable to be encoded.
SET(BIN_DIR ${CMAKE_CURRENT_BINARY_DIR})
IF(EXECUTABLE_OUTPUT_PATH)
SET(BIN_DIR ${EXECUTABLE_OUTPUT_PATH})
ENDIF(EXECUTABLE_OUTPUT_PATH)
SET(CFG_INTDIR "/${CMAKE_CFG_INTDIR}")
IF(CMAKE_BUILD_TOOL MATCHES "make")
SET(CFG_INTDIR "")
ENDIF(CMAKE_BUILD_TOOL MATCHES "make")
# Take advantage of a better custom command syntax if possible.
SET(CMD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}EncodeExecutable.exe)
SET(FWD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}ProcessFwd9x.exe)
SET(CMD ${CMAKE_CURRENT_BINARY_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}EncodeExecutable.exe)
SET(FWD ${CMAKE_CURRENT_BINARY_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}ProcessFwd9x.exe)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
COMMAND ${CMD}