Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmake_minimum_required(VERSION 3.18)
- project(transport_catalogue CXX)
- set(CMAKE_CXX_STANDARD 17)
- find_package(Protobuf REQUIRED)
- find_package(Threads REQUIRED)
- protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS transport_catalogue.proto)
- set(TRANSCAT_FILES domain.h
- geo.h
- graph.h
- json.cpp json.h
- json_builder.cpp json_builder.h
- json_reader.cpp json_reader.h
- main.cpp
- map_renderer.cpp map_renderer.h
- ranges.h
- request_handler.cpp request_handler.h
- router.h
- serialization.h serialization.cpp
- svg.cpp svg.h
- transport_catalogue.cpp transport_catalogue.h transport_catalogue.proto
- transport_router.cpp transport_router.h
- ${PROTO_SRCS} ${PROTO_HDRS})
- add_executable(transport_catalogue ${PROTO_SRCS} ${PROTO_HDRS} ${TRANSCAT_FILES})
- target_include_directories(transport_catalogue PUBLIC ${Protobuf_INCLUDE_DIRS})
- target_include_directories(transport_catalogue PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
- set_target_properties(transport_catalogue PROPERTIES OUTPUT_NAME "transport_catalogue")
- string(REPLACE "protobuf.lib" "protobufd.lib" "Protobuf_LIBRARY_DEBUG" "${Protobuf_LIBRARY_DEBUG}")
- string(REPLACE "protobuf.a" "protobufd.a" "Protobuf_LIBRARY_DEBUG" "${Protobuf_LIBRARY_DEBUG}")
- target_link_libraries(transport_catalogue "$<IF:$<CONFIG:Debug>,${Protobuf_LIBRARY_DEBUG},${Protobuf_LIBRARY}>" Threads::Threads)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement