forked from Archive/PX4-Autopilot
Cmake build: do not change CMAKE_RUNTIME_OUTPUT_DIRECTORY if building with catkin
This commit is contained in:
parent
c7eb21be86
commit
a6121e1655
|
@ -260,7 +260,12 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
|
|||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# For the catkin build process, unset build of dynamically-linked binaries
|
||||
if (CATKIN_DEVEL_PREFIX)
|
||||
# and do not change CMAKE_RUNTIME_OUTPUT_DIRECTORY
|
||||
if (NOT CATKIN_DEVEL_PREFIX)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PX4_BINARY_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PX4_BINARY_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PX4_BINARY_DIR})
|
||||
else()
|
||||
SET(BUILD_SHARED_LIBS OFF)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -5,6 +5,12 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|||
|
||||
get_property(module_libraries GLOBAL PROPERTY PX4_MODULE_LIBRARIES)
|
||||
|
||||
# When building with catkin, do not change CMAKE_RUNTIME_OUTPUT_DIR from
|
||||
# CMAKE_CURRENT_BINARY_DIR ''./platforms/posix' to './bin'
|
||||
if (NOT CATKIN_DEVEL_PREFIX)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
endif()
|
||||
|
||||
set(PX4_SHELL_COMMAND_PREFIX "px4-")
|
||||
|
||||
add_definitions("-DPX4_SHELL_COMMAND_PREFIX=\"${PX4_SHELL_COMMAND_PREFIX}\"")
|
||||
|
|
Loading…
Reference in New Issue