From 654844306154eae06d6a8591971b4894c9eb8fce Mon Sep 17 00:00:00 2001 From: Charles Hathaway Date: Mon, 18 Mar 2019 14:22:44 -0400 Subject: [PATCH] [#2] Populate YOTTADB_LIBRARIES, ensure the suffix is set correctly --- ydbcmake/CMakeDetermineMUMPSCompiler.cmake | 2 +- ydbcmake/FindYOTTADB.cmake | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ydbcmake/CMakeDetermineMUMPSCompiler.cmake b/ydbcmake/CMakeDetermineMUMPSCompiler.cmake index af0858e..6d10ca1 100644 --- a/ydbcmake/CMakeDetermineMUMPSCompiler.cmake +++ b/ydbcmake/CMakeDetermineMUMPSCompiler.cmake @@ -39,7 +39,7 @@ if(PKG_CONFIG_FOUND) # It is suspected to be a cmake bug so for now we define the variables that show up as Missing to work around this. # Hence the "set" commands below before the pkg_check_modules() call. set(CMAKE_FIND_LIBRARY_PREFIXES "lib") - set(CMAKE_FIND_LIBRARY_SUFFIXES "so") + set(CMAKE_FIND_LIBRARY_SUFFIXES ".so;.a") pkg_check_modules(PC_YOTTADB QUIET yottadb) endif() diff --git a/ydbcmake/FindYOTTADB.cmake b/ydbcmake/FindYOTTADB.cmake index fceddd5..1719fb5 100644 --- a/ydbcmake/FindYOTTADB.cmake +++ b/ydbcmake/FindYOTTADB.cmake @@ -31,7 +31,7 @@ find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) # See comment in ydbcmake/CMakeDetermineMUMPSCompiler.cmake for why the below two set commands are needed. set(CMAKE_FIND_LIBRARY_PREFIXES "lib") - set(CMAKE_FIND_LIBRARY_SUFFIXES "so") + set(CMAKE_FIND_LIBRARY_SUFFIXES ".so;.a") pkg_check_modules(PC_YOTTADB QUIET yottadb) endif() @@ -41,9 +41,11 @@ endif() # both in a YottaDB and GT.M build/install directory. find_path(YOTTADB_INCLUDE_DIRS NAMES mumps HINTS $ENV{ydb_dist} $ENV{gtm_dist} ${PC_YOTTADB_INCLUDEDIR} ) +find_library(YOTTADB_LIBRARY NAMES yottadb gtmshr + HINTS $ENV{ydb_dist} $ENV{gtm_dist} ${PC_YOTTADB_LIBS} ) # For YottaDB, the directory where we install header files is same as directory where we install libraries -set(YOTTADB_LIBRARIES ${YOTTADB_INCLUDE_DIRS}) +set(YOTTADB_LIBRARIES ${YOTTADB_LIBRARY}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(YOTTADB DEFAULT_MSG