Skip to content
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

how to compile this project #8

Open
haydengaoCN opened this issue Oct 15, 2018 · 3 comments
Open

how to compile this project #8

haydengaoCN opened this issue Oct 15, 2018 · 3 comments

Comments

@haydengaoCN
Copy link

Hi, I wonder how to build this project.
I tried: mkdir build && cd build; cmake ..
and get the error message:

_-- Start building project
-- Could NOT find ZMQ (missing: ZMQ_LIBRARY ZMQ_INCLUDE_DIR)
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.10/Modules/FindProtobuf.cmake:543 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
ps-lite/cmake/ProtoBuf.cmake:4 (find_package)
ps-lite/CMakeLists.txt:22 (include)

@haydengaoCN
Copy link
Author

Well, I built the project successfully with qmake. Still curious about how to compile this with cmake = =

@longerzone
Copy link

longerzone commented Nov 23, 2018

I modify the CmakeLists.txt with:
...
set(CMAKE_CXX_FLAGS "-std=c++11 -O3 -Wno-unknown-pragmas -Wall -fopenmp -pthread -I/home/rhel/dist-lr-master/ps-lite/deps/include -pthread -L/home/rhel/dist-lr-master/ps-lite/deps/lib -lprotobuf -lpthread ")
set(PROTOBUF_INCLUDE_DIR "/home/rhel/dist-lr-master/ps-lite/deps/include/google/protobuf")
set(PROTOBUF_LIBRARY "/home/rhel/dist-lr-master/ps-lite/deps/lib")
set(ZMQ_LIBRARY "/home/rhel/dist-lr-master/ps-lite/deps/lib")
set(ZMQ_INCLUDE_DIR "/home/rhel/dist-lr-master/ps-lite/deps/include")

...
link_directories(
"${THIRD_PARTY_DIR}/lib"
"${PS_LITE_DIR}/deps/lib"
)
...
and then compile with , it will resolved:
cmake ..
make

@haydengaoCN
Copy link
Author

Thank you for your reply & help. I will try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants