File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed
Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.28)
22
33project (vision.cpp VERSION 0.2.0 LANGUAGES CXX)
44
5+ option (BUILD_SHARED_LIBS "Build shared libraries instead of static libraries" ON )
56option (VISP_VULKAN "Enable Vulkan support" OFF )
67option (VISP_DEV "Enable development mode" OFF )
78option (VISP_CI "Enable for continuous integration environment" OFF )
@@ -16,6 +17,12 @@ if(PROJECT_IS_TOP_LEVEL)
1617 set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /bin)
1718endif ()
1819
20+ # Set default build type to Release (except for multi-config generators)
21+ if (NOT XCODE AND NOT MSVC AND NOT CMAKE_BUILD_TYPE )
22+ set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
23+ set_property (CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" )
24+ endif ()
25+
1926# Configure assertions
2027
2128if (VISP_DEV)
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ cd vision.cpp
151151
152152** Configure and build**
153153``` sh
154- cmake . -B build -D CMAKE_BUILD_TYPE=Release
154+ cmake . -B build
155155cmake --build build --config Release
156156```
157157
@@ -160,7 +160,7 @@ cmake --build build --config Release
160160Building with Vulkan GPU support requires the [ Vulkan SDK] ( https://www.lunarg.com/vulkan-sdk/ ) to be installed.
161161
162162``` sh
163- cmake . -B build -D CMAKE_BUILD_TYPE=Release -D VISP_VULKAN=ON
163+ cmake . -B build -D VISP_VULKAN=ON
164164```
165165
166166### Tests _ (Optional)_
Original file line number Diff line number Diff line change 1- add_library (visioncpp SHARED )
1+ add_library (visioncpp)
22
33target_sources (visioncpp PRIVATE
44 arch/birefnet.cpp
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ include(reference-images.cmake)
3838#
3939# Workbench library for Python tests
4040
41- add_library (vision-workbench workbench.cpp)
41+ add_library (vision-workbench SHARED workbench.cpp)
4242target_include_directories (vision-workbench PRIVATE ../src)
4343target_compile_definitions (vision-workbench PRIVATE ${VISP_ASSERT} ${VISP_DEFINITIONS} )
4444target_compile_options (vision-workbench PRIVATE ${VISP_COMP_OPTIONS} )
You can’t perform that action at this time.
0 commit comments