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

Commit

Permalink
[#1] Work around what look like cmake issues while building posix plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nars1 committed Mar 7, 2019
1 parent 4beba39 commit a8acc9b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ydbcmake/CMakeDetermineMUMPSCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@

find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
# On cmake versions 3.12.1 thru at least 3.13.4, we noticed the following error in pkg_check_modules()
# when trying to build the posix_plugin.
#
# CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
# Missing variable is:
# CMAKE_FIND_LIBRARY_PREFIXES
#
# 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")
pkg_check_modules(PC_YOTTADB QUIET yottadb)
endif()

Expand Down
3 changes: 3 additions & 0 deletions ydbcmake/FindYOTTADB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

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")
pkg_check_modules(PC_YOTTADB QUIET yottadb)
endif()

Expand Down

0 comments on commit a8acc9b

Please sign in to comment.