| 1 |
include(CMakeFindDependencyMacro) |
| 2 |
|
| 3 |
if (NOT MSVC) |
| 4 |
set(THREADS_PREFER_PTHREAD_FLAG ON) |
| 5 |
find_package(Threads REQUIRED) |
| 6 |
endif() |
| 7 |
|
| 8 |
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/modules") |
| 9 |
find_dependency(crypto) |
| 10 |
|
| 11 |
# Allow static or shared lib to be used. |
| 12 |
# If both are installed, choose based on BUILD_SHARED_LIBS. |
| 13 |
if (BUILD_SHARED_LIBS) |
| 14 |
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/shared") |
| 15 |
include(${CMAKE_CURRENT_LIST_DIR}/shared/@[email protected]) |
| 16 |
else() |
| 17 |
include(${CMAKE_CURRENT_LIST_DIR}/static/@[email protected]) |
| 18 |
endif() |
| 19 |
else() |
| 20 |
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/static") |
| 21 |
include(${CMAKE_CURRENT_LIST_DIR}/static/@[email protected]) |
| 22 |
else() |
| 23 |
include(${CMAKE_CURRENT_LIST_DIR}/shared/@[email protected]) |
| 24 |
endif() |
| 25 |
endif() |
| 26 |
|