Modified the ROOTMacros.cmake to allow GENERATE_EXECUTABLE()

to install executables in directory set by BIN_DESTINATION (or in bin/ if not set).

Changed the location of the executables:
- from build/bin/ to build/bin/examples/example-name/
- from install/bin/ to install/examples/example-name/bin/
This commit is contained in:
Radoslaw Karabowicz
2016-06-15 12:14:43 +02:00
committed by Mohammad Al-Turany
parent e7ad0d6c34
commit ac9475c591
14 changed files with 70 additions and 34 deletions

View File

@@ -6,8 +6,10 @@
# copied verbatim in the file "LICENSE" #
################################################################################
configure_file(${CMAKE_SOURCE_DIR}/examples/MQ/5-req-rep/ex5-req-rep.json ${CMAKE_BINARY_DIR}/bin/config/ex5-req-rep.json)
configure_file(${CMAKE_SOURCE_DIR}/examples/MQ/5-req-rep/startMQEx5.sh.in ${CMAKE_BINARY_DIR}/bin/startMQEx5.sh)
configure_file(${CMAKE_SOURCE_DIR}/examples/MQ/5-req-rep/ex5-req-rep.json
${CMAKE_BINARY_DIR}/bin/config/ex5-req-rep.json)
configure_file(${CMAKE_SOURCE_DIR}/examples/MQ/5-req-rep/startMQEx5.sh.in
${CMAKE_BINARY_DIR}/bin/examples/MQ/5-req-rep/startMQEx5.sh)
Set(INCLUDE_DIRECTORIES
${CMAKE_SOURCE_DIR}/fairmq
@@ -61,6 +63,9 @@ set(Exe_Source
list(LENGTH Exe_Names _length)
math(EXPR _length ${_length}-1)
set(BIN_DESTINATION share/fairbase/examples/MQ/5-req-rep/bin)
set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/examples/MQ/5-req-rep")
ForEach(_file RANGE 0 ${_length})
list(GET Exe_Names ${_file} _name)
list(GET Exe_Source ${_file} _src)

View File

@@ -4,9 +4,9 @@ ex5config="@CMAKE_BINARY_DIR@/bin/config/ex5-req-rep.json"
CLIENT="ex5-client"
CLIENT+=" --id client"
CLIENT+=" --mq-config $ex5config"
xterm -geometry 80x23+0+0 -hold -e @CMAKE_BINARY_DIR@/bin/$CLIENT &
xterm -geometry 80x23+0+0 -hold -e @CMAKE_BINARY_DIR@/bin/examples/MQ/5-req-rep/$CLIENT &
SERVER="ex5-server"
SERVER+=" --id server"
SERVER+=" --mq-config $ex5config"
xterm -geometry 80x23+500+0 -hold -e @CMAKE_BINARY_DIR@/bin/$SERVER &
xterm -geometry 80x23+500+0 -hold -e @CMAKE_BINARY_DIR@/bin/examples/MQ/5-req-rep/$SERVER &