Set C++11 as minimum supported C++ version

Fixes #71
This commit is contained in:
Jochen Topf 2023-10-02 10:02:58 +02:00
parent 3b3b9cd2cd
commit 374895c1e3
2 changed files with 3 additions and 0 deletions

View File

@ -2,9 +2,11 @@ protobuf_generate_cpp(CPPS HS fileformat.proto osmformat.proto)
add_library(osmpbf STATIC ${CPPS})
target_include_directories(osmpbf SYSTEM PUBLIC ${Protobuf_INCLUDE_DIRS})
set_property(TARGET osmpbf PROPERTY CXX_STANDARD 11)
install(TARGETS osmpbf ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
add_library(osmpbf_shared SHARED ${CPPS})
set_property(TARGET osmpbf_shared PROPERTY CXX_STANDARD 11)
target_link_libraries(osmpbf_shared PRIVATE protobuf::libprotobuf)
target_include_directories(osmpbf_shared SYSTEM PUBLIC ${Protobuf_INCLUDE_DIRS})
set_target_properties(osmpbf_shared PROPERTIES OUTPUT_NAME osmpbf

View File

@ -10,6 +10,7 @@ add_executable(osmpbf-outline osmpbf-outline.cpp)
target_include_directories(osmpbf-outline SYSTEM PRIVATE ${ZLIB_INCLUDE_DIR})
target_link_libraries(osmpbf-outline PRIVATE osmpbf ZLIB::ZLIB protobuf::libprotobuf)
set_property(TARGET osmpbf-outline PROPERTY CXX_STANDARD 11)
install(TARGETS osmpbf-outline RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES osmpbf-outline.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)