diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-07-04 07:43:27 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-07-04 07:45:57 +0200 |
commit | 14c6d285fc9f37de41ce81bae57b7731acddad3b (patch) | |
tree | 31ddfe3d90e0628e8308ae06b022be57149eda8d | |
parent | ab5941aaefb9a5cc38d8aa4adedc3a4d411889c0 (diff) | |
download | json-rpc-shell-14c6d285fc9f37de41ce81bae57b7731acddad3b.tar.gz json-rpc-shell-14c6d285fc9f37de41ce81bae57b7731acddad3b.tar.xz json-rpc-shell-14c6d285fc9f37de41ce81bae57b7731acddad3b.zip |
CMakeLists.txt: fix OpenBSD build
Note that we still don't use link_directories() as often as we should.
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ddde69f..ebf7842 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,17 +18,15 @@ set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # Dependencies find_package (Curses) find_package (PkgConfig REQUIRED) -pkg_check_modules (dependencies REQUIRED libcurl jansson) # Note that cURL can link to a different version of libssl than we do, # in which case the results are undefined -pkg_check_modules (libssl REQUIRED libssl libcrypto) +pkg_check_modules (dependencies REQUIRED libcurl jansson libssl libcrypto) find_package (LibEV REQUIRED) pkg_check_modules (ncursesw ncursesw) -set (project_libraries ${dependencies_LIBRARIES} - ${libssl_LIBRARIES} ${LibEV_LIBRARIES}) -include_directories (${dependencies_INCLUDE_DIRS} - ${libssl_INCLUDE_DIRS} ${LibEV_INCLUDE_DIRS}) +set (project_libraries ${dependencies_LIBRARIES} ${LibEV_LIBRARIES}) +include_directories (${dependencies_INCLUDE_DIRS} ${LibEV_INCLUDE_DIRS}) +link_directories (${dependencies_LIBRARY_DIRS}) # -liconv may or may not be a part of libc find_library (iconv_LIBRARIES iconv) @@ -47,6 +45,7 @@ endif () if (ncursesw_FOUND) list (APPEND project_libraries ${ncursesw_LIBRARIES}) include_directories (${ncursesw_INCLUDE_DIRS}) + link_directories (${ncursesw_LIBRARY_DIRS}) elseif (CURSES_FOUND) list (APPEND project_libraries ${CURSES_LIBRARY}) include_directories (${CURSES_INCLUDE_DIR}) |