Skip to content

Commit

Permalink
[rocksdb] Fix build and use debug suffix 'd'
Browse files Browse the repository at this point in the history
[gtest] Fix issue microsoft#2373
  • Loading branch information
yurybura committed Mar 12, 2018
1 parent 148cb36 commit cc3d12b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions ports/benchmark/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ vcpkg_configure_cmake(
PREFER_NINJA
OPTIONS
-DBENCHMARK_ENABLE_TESTING=OFF
-DCMAKE_DEBUG_POSTFIX=d
)

vcpkg_install_cmake()
Expand Down
1 change: 1 addition & 0 deletions ports/gflags/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ vcpkg_configure_cmake(
-DGFLAGS_REGISTER_BUILD_DIR:BOOL=OFF
-DGFLAGS_REGISTER_INSTALL_PREFIX:BOOL=OFF
-DBUILD_gflags_nothreads_LIB:BOOL=OFF
-DCMAKE_DEBUG_POSTFIX=d
)

vcpkg_install_cmake()
Expand Down
3 changes: 2 additions & 1 deletion ports/lz4/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG
-DLZ4_SKIP_INCLUDES=ON)
-DLZ4_SKIP_INCLUDES=ON
-DCMAKE_DEBUG_POSTFIX=d)

vcpkg_install_cmake()
vcpkg_copy_pdbs()
Expand Down
8 changes: 4 additions & 4 deletions ports/rocksdb/0001-third-party.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ index a364d1d..1d85d50 100644
-set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/bin/retail/amd64/gflags.lib)
+set(GFLAGS_HOME ${CURRENT_INSTALLED_DIR})
+set(GFLAGS_INCLUDE ${GFLAGS_HOME}/include)
+find_library(GFLAGS_LIB_DEBUG NAMES gflags gflags_static)
+set(GFLAGS_LIB_RELEASE ${GFLAGS_LIB_DEBUG})
+set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/debug/lib/gflagsd.lib)
+set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/lib/gflags.lib)

# ================================================== GFLAGS ==================================================
#
Expand All @@ -36,7 +36,7 @@ index a364d1d..1d85d50 100644
-set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/bin/retail/amd64/snappy.lib)
+set(SNAPPY_HOME ${CURRENT_INSTALLED_DIR})
+set(SNAPPY_INCLUDE ${SNAPPY_HOME}/include)
+set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/debug/lib/snappy.lib)
+set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/debug/lib/snappyd.lib)
+set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/lib/snappy.lib)

#
Expand All @@ -51,7 +51,7 @@ index a364d1d..1d85d50 100644
-set(LZ4_LIB_RELEASE ${LZ4_HOME}/bin/retail/amd64/lz4.lib)
+set(LZ4_HOME ${CURRENT_INSTALLED_DIR})
+set(LZ4_INCLUDE ${LZ4_HOME}/include)
+set(LZ4_LIB_DEBUG ${LZ4_HOME}/debug/lib/lz4.lib)
+set(LZ4_LIB_DEBUG ${LZ4_HOME}/debug/lib/lz4d.lib)
+set(LZ4_LIB_RELEASE ${LZ4_HOME}/lib/lz4.lib)

#
Expand Down
2 changes: 1 addition & 1 deletion ports/rocksdb/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: rocksdb
Version: 5.10.4-1
Description: A library that provides an embeddable, persistent key-value store for fast storage
Build-Depends: snappy, lz4, zlib, gtest
Build-Depends: snappy, gflags, lz4, zlib
8 changes: 3 additions & 5 deletions ports/rocksdb/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
include(vcpkg_common_functions)

if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
message(FATAL_ERROR "Rocksdb only supports x64")
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/rocksdb
Expand Down Expand Up @@ -41,9 +37,11 @@ vcpkg_configure_cmake(
-DROCKSDB_INSTALL_ON_WINDOWS=ON
-DFAIL_ON_WARNINGS=OFF
-DWITH_MD_LIBRARY=${WITH_MD_LIBRARY}
-DPORTABLE=ON
-DCMAKE_DEBUG_POSTFIX=d
-DROCKSDB_DISABLE_INSTALL_SHARED_LIB=${ROCKSDB_DISABLE_INSTALL_SHARED_LIB}
-DROCKSDB_DISABLE_INSTALL_STATIC_LIB=${ROCKSDB_DISABLE_INSTALL_STATIC_LIB}
-DROCKSDB_VERSION=5.10.3
-DROCKSDB_VERSION=5.10.4
-DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR}
-DCMAKE_DISABLE_FIND_PACKAGE_TBB=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_NUMA=TRUE
Expand Down
3 changes: 2 additions & 1 deletion ports/snappy/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DSNAPPY_BUILD_TESTS=OFF)
-DSNAPPY_BUILD_TESTS=OFF
-DCMAKE_DEBUG_POSTFIX=d)

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Snappy)
Expand Down

0 comments on commit cc3d12b

Please sign in to comment.