Created
December 18, 2020 07:25
-
-
Save vorachet/cee2e14a2f727230f77f3926ac9adab2 to your computer and use it in GitHub Desktop.
CMAKE for ZMQPP (Linux + MaxOS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.10) | |
project(lab_zmq) | |
set(CMAKE_CXX_STANDARD 11) | |
set(THREADS_PREFER_PTHREAD_FLAG ON) | |
find_package(Threads REQUIRED) | |
if (UNIX AND NOT APPLE) | |
message("LNUX") | |
endif() | |
if (APPLE) | |
message("APPLE") | |
include_directories(/usr/local/Cellar/zeromq/4.3.3/include) | |
include_directories(/usr/local/Cellar/zmqpp/4.2.0/include) | |
include_directories(/usr/local/Cellar/libsodium/1.0.18_1/include) | |
link_directories(/usr/local/Cellar/zeromq/4.3.3/lib) | |
link_directories(/usr/local/Cellar/zmqpp/4.2.0/lib) | |
link_directories(/usr/local/Cellar/libsodium/1.0.18_1/lib) | |
endif() | |
add_executable(server server.cpp) | |
if (UNIX AND NOT APPLE) | |
target_link_libraries(server zmq zmqpp sodium) | |
endif() | |
if (APPLE) | |
target_link_libraries(server zmq zmqpp sodium) | |
endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment