Skip to content

Commit

Permalink
Another try
Browse files Browse the repository at this point in the history
  • Loading branch information
joto committed Jan 7, 2024
1 parent 250586f commit 617ea9f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ project(osmpbf VERSION 1.5.0)

include(GNUInstallDirs)

set(protobuf_MODULE_COMPATIBLE ON CACHE BOOL "")
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
find_package(Protobuf REQUIRED)

add_subdirectory(osmpbf)
Expand Down
1 change: 1 addition & 0 deletions osmpbf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ protobuf_generate_cpp(CPPS HS fileformat.proto osmformat.proto)

add_library(osmpbf STATIC ${CPPS})
target_compile_features(osmpbf PUBLIC cxx_std_11)
target_link_libraries(osmpbf PRIVATE protobuf::libprotobuf)
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})
Expand Down
2 changes: 1 addition & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64)
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)
target_link_libraries(osmpbf-outline PRIVATE osmpbf ZLIB::ZLIB)
set_property(TARGET osmpbf-outline PROPERTY CXX_STANDARD 11)

install(TARGETS osmpbf-outline RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down

0 comments on commit 617ea9f

Please sign in to comment.