forked from minetest/minetest
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add local zmqpp build support via submodule
- Loading branch information
AI_WAIFU
committed
Jan 23, 2023
1 parent
8eb84c0
commit e64211c
Showing
4 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "lib/zmqpp"] | ||
path = lib/zmqpp | ||
url = [email protected]:zeromq/zmqpp.git |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,36 @@ | ||
option(ENABLE_SYSTEM_ZMQPP "Use ZMQPP from system" TRUE) | ||
mark_as_advanced(ZMQPP_LIBRARY ZMQPP_INCLUDE_DIR) | ||
set(USE_SYSTEM_ZMQPP FALSE) | ||
|
||
find_path(ZMQPP_INCLUDE_DIR NAMES zmqpp.hpp PATH_SUFFIXES zmqpp) | ||
message(${ZMQPP_INCLUDE_DIR}) | ||
|
||
find_library(ZMQPP_LIBRARY NAMES zmqpp) | ||
message(${ZMQPP_LIBRARY}) | ||
if(ENABLE_SYSTEM_ZMQPP) | ||
find_library(ZMQPP_LIBRARY NAMES zmqpp) | ||
find_path(ZMQPP_INCLUDE_DIR NAMES zmqpp.hpp PATH_SUFFIXES zmqpp) | ||
|
||
if(ZMQPP_LIBRARY AND ZMQPP_INCLUDE_DIR) | ||
message (STATUS "Using GMP provided by system.") | ||
set(USE_SYSTEM_GMP TRUE) | ||
else() | ||
message (STATUS "Detecting GMP from system failed.") | ||
endif() | ||
|
||
endif() | ||
|
||
if(NOT USE_SYSTEM_GMP) | ||
message(STATUS "Using zmqpp submodule") | ||
find_path(ZMQPP_INCLUDE_DIR NAMES zmqpp.hpp | ||
PATHS | ||
${CMAKE_SOURCE_DIR}/lib/zmqpp/src/zmqpp) | ||
|
||
find_library(ZMQPP_LIBRARY NAMES zmqpp | ||
PATHS ${CMAKE_SOURCE_DIR}/lib/zmqpp/build/max-g++) | ||
|
||
if(ZMQPP_LIBRARY AND ZMQPP_INCLUDE_DIR) | ||
message (STATUS "Using ZMQPP provided by the submodule.") | ||
set(USE_SYSTEM_GMP TRUE) | ||
else() | ||
message (STATUS "ZMQPP submodule detection failed, please navigate to lib/zmqpp, initialize the submodule with \"git submodule update --init\", and then use \"make\" to build zmqpp") | ||
endif() | ||
endif() | ||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Zmqpp DEFAULT_MSG ZMQPP_LIBRARY ZMQPP_INCLUDE_DIR) |