diff --git a/vendor/cryptopp/CMakeLists.txt b/vendor/cryptopp/CMakeLists.txt index 99fade43..5fbf0741 100644 --- a/vendor/cryptopp/CMakeLists.txt +++ b/vendor/cryptopp/CMakeLists.txt @@ -17,7 +17,12 @@ if(NOT DISABLE_OPENMP) target_link_libraries(cryptopp PRIVATE -lomp) else() find_package(OpenMP) + if (NOT OpenMP_CXX_LIBRARIES) + # Older CMake didn't have OpenMP_CXX_LIBRARIES defined yet, but passed the library in OpenMP_CXX_FLAGS + set(OpenMP_CXX_LIBRARIES ${OpenMP_CXX_FLAGS}) + endif() if(OPENMP_FOUND) + message(STATUS "Using OpenMP flags: ${OpenMP_CXX_FLAGS}") message(STATUS "Using OpenMP library: ${OpenMP_CXX_LIBRARIES}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") target_link_libraries(cryptopp PRIVATE ${OpenMP_CXX_LIBRARIES})