Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure uuid-dev is present when building on Linux
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
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
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,30 @@ | ||
if(Uuid_INCLUDE_DIR AND Uuid_LIBRARY) | ||
set(Uuid_FIND_QUIETLY TRUE) | ||
endif() | ||
|
||
|
||
find_path(Uuid_INCLUDE_DIR uuid/uuid.h | ||
/usr/local/include | ||
/usr/include | ||
) | ||
|
||
find_library(Uuid_LIBRARY NAMES uuid | ||
PATHS /usr/local/lib /usr/lib | ||
) | ||
|
||
set(Uuid_LIBRARIES ${Uuid_LIBRARY}) | ||
|
||
|
||
if(Uuid_INCLUDE_DIR AND Uuid_LIBRARY) | ||
set(Uuid_FOUND TRUE) | ||
endif() | ||
|
||
if(Uuid_FOUND) | ||
if(NOT Uuid_FIND_QUIETLY) | ||
message(STATUS "Found libuuid: ${Uuid_INCLUDE_DIR}") | ||
endif() | ||
else() | ||
if(Uuid_FIND_REQUIRED) | ||
message(FATAL_ERROR "Could not find libuuid") | ||
endif() | ||
endif() |