Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

Commit

Permalink
[#2] Populate YOTTADB_LIBRARIES, ensure the suffix is set correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Hathaway committed Mar 18, 2019
1 parent a8acc9b commit 6548443
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ydbcmake/CMakeDetermineMUMPSCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
6 changes: 4 additions & 2 deletions ydbcmake/FindYOTTADB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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
Expand Down

0 comments on commit 6548443

Please sign in to comment.