-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix double declaration of protobuf and construction of the binary #66
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
the link of the binary was reduced to a single line as it is more practical to reduce the number of lines and also to avoid the link_target so many times.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") | |
set(PLATFORM_NAME "linux") | ||
endif() | ||
|
||
message(STATUS "PLATFORMA_NAME ${PLATFORM_NAME}") | ||
message(STATUS "PLATFORM_NAME ${PLATFORM_NAME}") | ||
|
||
find_package(Protobuf CONFIG REQUIRED) | ||
include_directories(${CMAKE_CURRENT_BINARY_DIR}) | ||
|
@@ -47,16 +47,9 @@ if(UNIX) | |
endif(UNIX) | ||
|
||
find_package(asio CONFIG REQUIRED) | ||
target_link_libraries(server-cmd PRIVATE asio::asio) | ||
|
||
find_package(spdlog CONFIG REQUIRED) | ||
target_link_libraries(server-cmd PRIVATE spdlog::spdlog) | ||
|
||
find_package(Protobuf CONFIG REQUIRED) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Repeat Find Protobuf |
||
target_link_libraries(server-cmd PRIVATE protobuf::libprotobuf) | ||
|
||
find_package(cxxopts CONFIG REQUIRED) | ||
target_link_libraries(server-cmd PRIVATE cxxopts::cxxopts) | ||
target_link_libraries(server-cmd PRIVATE asio::asio spdlog::spdlog protobuf::libprotobuf cxxopts::cxxopts) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
if(${PLATFORM_NAME} STREQUAL "linux") | ||
find_package(PkgConfig REQUIRED) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix a typo in CMakeLists.txt