Skip to content

Commit 0aa75ea

Browse files
matlo607mirouse
authored andcommitted
fix paths to test binaries
1 parent fa598ea commit 0aa75ea

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

proton-c/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,14 @@ if (qpid-proton-proactor)
640640
)
641641
endif()
642642

643+
if (NOT BIN_INSTALL_DIR)
644+
set(BIN_INSTALL_DIR "bin")
645+
endif(NOT BIN_INSTALL_DIR)
646+
643647
# Install executables and libraries
644648
install(TARGETS qpid-proton qpid-proton-core ${LIB_TARGETS}
645649
EXPORT proton
646-
RUNTIME DESTINATION bin
650+
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
647651
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
648652
LIBRARY DESTINATION ${LIB_INSTALL_DIR})
649653

proton-c/bindings/cpp/CMakeLists.txt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,13 @@ set_target_properties (
103103
)
104104

105105
## Install
106+
if (NOT BIN_INSTALL_DIR)
107+
set(BIN_INSTALL_DIR "bin")
108+
endif(NOT BIN_INSTALL_DIR)
106109

107110
install(TARGETS qpid-proton-cpp
108111
EXPORT proton-cpp
109-
RUNTIME DESTINATION bin
112+
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
110113
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
111114
LIBRARY DESTINATION ${LIB_INSTALL_DIR})
112115

@@ -132,11 +135,11 @@ install (FILES
132135
DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
133136

134137
if (DEFINED CMAKE_IMPORT_LIBRARY_PREFIX)
135-
set(PROTONCPPLIB ${CMAKE_IMPORT_LIBRARY_PREFIX}qpid-proton-cpp${CMAKE_IMPORT_LIBRARY_SUFFIX})
136-
set(PROTONCPPLIBDEBUG ${CMAKE_IMPORT_LIBRARY_PREFIX}qpid-proton-cpp${CMAKE_DEBUG_POSTFIX}${CMAKE_IMPORT_LIBRARY_SUFFIX})
138+
set(PROTONCPPLIB ${CMAKE_IMPORT_LIBRARY_PREFIX}qpid-proton-cpp${CMAKE_IMPORT_LIBRARY_SUFFIX})
139+
set(PROTONCPPLIBDEBUG ${CMAKE_IMPORT_LIBRARY_PREFIX}qpid-proton-cpp${CMAKE_DEBUG_POSTFIX}${CMAKE_IMPORT_LIBRARY_SUFFIX})
137140
else ()
138-
set(PROTONCPPLIB ${CMAKE_SHARED_LIBRARY_PREFIX}qpid-proton-cpp${CMAKE_SHARED_LIBRARY_SUFFIX})
139-
set(PROTONCPPLIBDEBUG ${CMAKE_SHARED_LIBRARY_PREFIX}qpid-proton-cpp${CMAKE_DEBUG_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX})
141+
set(PROTONCPPLIB ${CMAKE_SHARED_LIBRARY_PREFIX}qpid-proton-cpp${CMAKE_SHARED_LIBRARY_SUFFIX})
142+
set(PROTONCPPLIBDEBUG ${CMAKE_SHARED_LIBRARY_PREFIX}qpid-proton-cpp${CMAKE_DEBUG_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX})
140143
endif ()
141144

142145
include(WriteBasicConfigVersionFile)
@@ -167,7 +170,7 @@ macro(add_cpp_test test)
167170
"PATH=$<TARGET_FILE_DIR:qpid-proton>"
168171
$<TARGET_FILE:${test}> ${ARGN})
169172
else ()
170-
add_test (NAME cpp-${test} COMMAND ${memcheck-cmd} ${CMAKE_CURRENT_BINARY_DIR}/${test} ${ARGN})
173+
add_test (NAME cpp-${test} COMMAND ${memcheck-cmd} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${test} ${ARGN})
171174
endif ()
172175
endmacro(add_cpp_test)
173176

proton-c/src/tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ macro (pn_add_c_test test)
4040
"PATH=$<TARGET_FILE_DIR:qpid-proton>"
4141
$<TARGET_FILE:${test}>)
4242
else ()
43-
add_test (${test} ${memcheck-cmd} ${CMAKE_CURRENT_BINARY_DIR}/${test})
43+
add_test (${test} ${memcheck-cmd} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${test})
4444
endif ()
4545
endmacro(pn_add_c_test)
4646

0 commit comments

Comments
 (0)