Skip to content

Commit

Permalink
set C and C++ standard
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrauch committed Jan 19, 2024
1 parent 82227ea commit bc760cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ endif()

set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 3 VERSION ${PROJECT_VERSION})
set_target_properties(${PROJECT_NAME} PROPERTIES DEBUG_POSTFIX "d")
set_property(TARGET ${PROJECT_NAME} PROPERTY C_STANDARD 11)


include(GNUInstallDirs)
target_include_directories(${PROJECT_NAME} PUBLIC
Expand Down Expand Up @@ -186,6 +188,7 @@ if (BUILD_EXAMPLES)
find_package(OpenCV COMPONENTS ${_OpenCV_REQUIRED_COMPONENTS} QUIET CONFIG)
if(OpenCV_FOUND)
enable_language(CXX)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)
# NB: contrib required for TickMeter in OpenCV 2.4. This is only required for 16.04 backwards compatibility and can be removed in the future.
# If we add it to the find_package initially, the demo won't build for newer OpenCV versions
if(OpenCV_VERSION VERSION_LESS "3.0.0")
Expand Down

0 comments on commit bc760cb

Please sign in to comment.