Skip to content

Commit

Permalink
Change cmake runtime output dir, add extensions lib for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hzcyf committed Jul 9, 2024
1 parent cdd97c4 commit 250b330
Show file tree
Hide file tree
Showing 43 changed files with 11 additions and 49 deletions.
1 change: 0 additions & 1 deletion 3rdparty/live555/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019
cmake_minimum_required(VERSION 3.5)
project(Live555 LANGUAGES CXX C)

Expand Down
14 changes: 7 additions & 7 deletions cmake/global_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ endif()

# output directories
string(TOLOWER ${CMAKE_BUILD_TYPE} OB_BUILD_TYPE)
set(OB_OUTPUT_DIRECTORY_ROOT ${CMAKE_BINARY_DIR}/${OB_CURRENT_OS}/${OB_BUILD_TYPE})
set(OB_OUTPUT_DIRECTORY_ROOT ${CMAKE_BINARY_DIR}/${OB_CURRENT_OS})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OB_OUTPUT_DIRECTORY_ROOT}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OB_OUTPUT_DIRECTORY_ROOT}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OB_OUTPUT_DIRECTORY_ROOT}/bin)
if(MSVC)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OB_CURRENT_OS}/debug/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OB_CURRENT_OS}/release/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OB_CURRENT_OS}/debug/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OB_CURRENT_OS}/release/lib")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OB_CURRENT_OS}/debug/lib")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OB_CURRENT_OS}/release/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OB_CURRENT_OS}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OB_CURRENT_OS}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OB_CURRENT_OS}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OB_CURRENT_OS}/lib")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OB_CURRENT_OS}/lib")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OB_CURRENT_OS}/lib")
endif()

# set install prefix to binary directory if not specified
Expand Down
2 changes: 0 additions & 2 deletions examples/0.basic.enumerate/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(ob_enumerate)

Expand Down
1 change: 0 additions & 1 deletion examples/0.basic.enumerate/CMakeLists_publish.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(Sample-PostProcessing)
Expand Down
1 change: 0 additions & 1 deletion examples/0.basic.quick_start/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(ob_quick_start)
Expand Down
1 change: 0 additions & 1 deletion examples/1.stream.callback/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(ob_callback)
Expand Down
1 change: 0 additions & 1 deletion examples/1.stream.color/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(ob_color)
Expand Down
1 change: 0 additions & 1 deletion examples/1.stream.color/CMakeLists_publish.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(Sample-ColorViewer)
Expand Down
1 change: 0 additions & 1 deletion examples/1.stream.depth/CMakeLists_publish.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(Sample-DepthViewer)
Expand Down
1 change: 0 additions & 1 deletion examples/1.stream.imu/CMakeLists_publish.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(Sample-ImuReader)
Expand Down
1 change: 0 additions & 1 deletion examples/1.stream.infrared/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(ob_infrared)
Expand Down
1 change: 0 additions & 1 deletion examples/1.stream.infrared/CMakeLists_publish.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(Sample-InfraredViewer)
Expand Down
1 change: 0 additions & 1 deletion examples/2.device.control/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(ob_device_control)
Expand Down
1 change: 0 additions & 1 deletion examples/2.device.control/CMakeLists_publish.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(Sample-SensorControl)
Expand Down
1 change: 0 additions & 1 deletion examples/2.device.hot_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(ob_hot_plugin)
Expand Down
1 change: 0 additions & 1 deletion examples/2.device.hot_plugin/CMakeLists_publish.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(Sample-HotPlugin)
Expand Down
1 change: 0 additions & 1 deletion examples/2.device.net_device/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(ob_net_device)
Expand Down
1 change: 0 additions & 1 deletion examples/2.device.net_device/CMakeLists_publish.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(Sample-NetDevice)
Expand Down
4 changes: 1 addition & 3 deletions examples/3.advanced.common_usages/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# minimum required cmake version: 3.1.15 support vs2019

cmake_minimum_required(VERSION 3.1.15)
cmake_minimum_required(VERSION 3.5)
project(ob_common_usages)

add_executable(${PROJECT_NAME} common_usages.cpp)
Expand Down
1 change: 0 additions & 1 deletion examples/3.advanced.hdr/CMakeLists_publish.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(Sample-HdrMerge)
Expand Down
1 change: 0 additions & 1 deletion examples/3.advanced.point_cloud/CMakeLists_publish.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(Sample-PointCloud)
Expand Down
1 change: 0 additions & 1 deletion examples/3.advanced.post_processing/CMakeLists_publish.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(Sample-PostProcessing)
Expand Down
1 change: 0 additions & 1 deletion examples/3.advanced.preset/CMakeLists_publish.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(Sample-PostProcessing)
Expand Down
1 change: 0 additions & 1 deletion examples/3.advanced.sync_align/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(ob_sync_align)
Expand Down
1 change: 0 additions & 1 deletion examples/3.advanced.sync_align/CMakeLists_publish.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019

cmake_minimum_required(VERSION 3.5)
project(Sample-Align)
Expand Down
4 changes: 2 additions & 2 deletions extensions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
cmake_minimum_required(VERSION 3.5)

add_custom_target(extensions)
add_custom_target(extensions ALL)

add_custom_command(
TARGET extensions
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_LIST_DIR}/filters/${OB_CURRENT_OS}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/extensions/filters")


add_custom_command(
TARGET extensions
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_LIST_DIR}/frameprocessor/${OB_CURRENT_OS}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/extensions/frameprocessor")


set_target_properties(extensions PROPERTIES FOLDER "modules")
Binary file added extensions/filters/win_x64/FilterProcessor.dll
Binary file not shown.
Empty file removed extensions/filters/win_x64/empty
Empty file.
Binary file added extensions/filters/win_x64/ob_priv_filter.dll
Binary file not shown.
Empty file.
Binary file not shown.
3 changes: 1 addition & 2 deletions src/device/component/sensor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
## minimum required cmake version: 3.5 support vs2019
cmake_minimum_required(VERSION 3.5)
#cmake_minimum_required(VERSION 3.5)

target_sources(${OB_TARGET_DEVICE} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/SensorBase.cpp ${CMAKE_CURRENT_LIST_DIR}/SensorBase.hpp)

Expand Down
1 change: 0 additions & 1 deletion src/device/component/sensor/motion/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019
cmake_minimum_required(VERSION 3.5)

file (GLOB _cpp_files "${CMAKE_CURRENT_LIST_DIR}/*.cpp")
Expand Down
1 change: 0 additions & 1 deletion src/device/component/sensor/video/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019
cmake_minimum_required(VERSION 3.5)

target_sources(${OB_TARGET_DEVICE} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/VideoSensor.cpp ${CMAKE_CURRENT_LIST_DIR}/VideoSensor.hpp)
1 change: 0 additions & 1 deletion src/device/protocol/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019
cmake_minimum_required(VERSION 3.5)

target_sources(${OB_TARGET_DEVICE} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/Protocol.cpp ${CMAKE_CURRENT_LIST_DIR}/Protocol.hpp)
1 change: 0 additions & 1 deletion src/platform/pal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019
cmake_minimum_required(VERSION 3.5)

if(OB_BUILD_WIN32)
Expand Down
1 change: 0 additions & 1 deletion src/platform/pal/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019
cmake_minimum_required(VERSION 3.5)


Expand Down
1 change: 0 additions & 1 deletion src/platform/pal/mac/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019
cmake_minimum_required(VERSION 3.5)


Expand Down
1 change: 0 additions & 1 deletion src/platform/pal/win/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019
cmake_minimum_required(VERSION 3.5)

file(GLOB PAL_SOURCES ${CMAKE_CURRENT_LIST_DIR}/WinPal.*)
Expand Down
1 change: 0 additions & 1 deletion src/platform/usb/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019
cmake_minimum_required(VERSION 3.5)

add_subdirectory(backend)
Expand Down
1 change: 0 additions & 1 deletion src/platform/usb/backend/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019
cmake_minimum_required(VERSION 3.5)


Expand Down
1 change: 0 additions & 1 deletion src/platform/usb/hid/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019
cmake_minimum_required(VERSION 3.5)

if(OB_BUILD_WIN32)
Expand Down
1 change: 0 additions & 1 deletion src/platform/usb/vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# minimum required cmake version: 3.5 support vs2019
cmake_minimum_required(VERSION 3.5)


Expand Down

0 comments on commit 250b330

Please sign in to comment.