Permalink
Browse files

Fixed libdir detection for db2

  • Loading branch information...
akashihi committed Feb 5, 2013
1 parent cec8c7e commit 0aa292f4189c5025330b342e0ee41fb67d1ad266
Showing with 13 additions and 6 deletions.
  1. +13 −6 src/cmake/modules/FindDB2.cmake
@@ -1,21 +1,28 @@
#TODO: Add detection on win32
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(DB2_LIBDIR "lib")
else()
set(DB2_LIBDIR "lib64")
endif()
find_path(DB2_INCLUDE_DIR sqlcli1.h
$ENV{DB2_INCLUDE_DIR}
$ENV{DB2_DIR}/include
/opt/ibm/db2/V10.1/include
/opt/ibm/db2/V9.7/include
/opt/ibm/db2/V9.5/include
/opt/ibm/db2/V9.1/include)
find_library(DB2_LIBRARY NAMES db2
PATHS
$ENV{DB2_LIB_DIR}
$ENV{DB2_DIR}/lib32
$ENV{DB2_DIR}/lib64
/opt/ibm/db2/V9.7/lib32
/opt/ibm/db2/V9.5/lib64
/opt/ibm/db2/V9.1/lib32
/opt/ibm/db2/V9.1/lib64)
$ENV{DB2_DIR}/${DB2_LIBDIR}
/opt/ibm/db2/V10.1/${DB2_LIBDIR}
/opt/ibm/db2/V9.7/${DB2_LIBDIR}
/opt/ibm/db2/V9.5/${DB2_LIBDIR}
/opt/ibm/db2/V9.1/${DB2_LIBDIR})
if(DB2_LIBRARY)
get_filename_component(DB2_LIBRARY_DIR ${DB2_LIBRARY} PATH)

0 comments on commit 0aa292f

Please sign in to comment.