Commit 9d29401c authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:5073] change how we link zlib so as not to confuse osx in some cases

git-svn-id: file:///svn/toku/tokudb@44531 c7de825b-a66e-492c-adef-691d508d4ae1
parent d94ce630
......@@ -91,8 +91,8 @@ add_dependencies(ft install_tdb_h build_lzma)
add_dependencies(ft_static install_tdb_h build_lzma)
## link with lzma (which should be static) and link dependers with zlib
target_link_libraries(ft LINK_PRIVATE lzma)
target_link_libraries(ft LINK_PUBLIC ${ZLIB_LIBRARIES})
target_link_libraries(ft LINK_PRIVATE lzma ${LIBTOKUPORTABILITY})
target_link_libraries(ft LINK_PUBLIC z)
target_link_libraries(ft_static LINK_PRIVATE lzma)
if (CMAKE_C_COMPILER_ID STREQUAL Intel)
......@@ -125,7 +125,7 @@ foreach(bin ${bins})
add_dependencies(${bin}_static install_tdb_h)
add_space_separated_property(TARGET ${bin}_static COMPILE_FLAGS "-fvisibility=hidden -fPIE")
add_space_separated_property(TARGET ${bin}_static LINK_FLAGS -pie)
target_link_libraries(${bin}_static ft_static ${ZLIB_LIBRARIES} ${LIBTOKUPORTABILITY}_static ${CMAKE_THREAD_LIBS_INIT} dl)
target_link_libraries(${bin}_static ft_static z ${LIBTOKUPORTABILITY}_static ${CMAKE_THREAD_LIBS_INIT} dl)
endforeach(bin)
# link in math.h library just for this tool.
......
......@@ -21,8 +21,8 @@ set(tokudb_srcs
## make the shared library
add_library(${LIBTOKUDB} SHARED ${tokudb_srcs})
add_dependencies(${LIBTOKUDB} install_tdb_h)
target_link_libraries(${LIBTOKUDB} LINK_PRIVATE lock_tree_static range_tree_static ft_static)
target_link_libraries(${LIBTOKUDB} LINK_PUBLIC ${ZLIB_LIBRARIES})
target_link_libraries(${LIBTOKUDB} LINK_PRIVATE lock_tree_static range_tree_static ft_static ${LIBTOKUPORTABILITY})
target_link_libraries(${LIBTOKUDB} LINK_PUBLIC z)
## make the static library
add_library(${LIBTOKUDB}_static STATIC ${tokudb_srcs})
......
......@@ -14,7 +14,7 @@ foreach(util ${utils})
COMPILE_DEFINITIONS "IS_TDB=1;USE_TDB=1;TDB_IS_STATIC=1")
add_space_separated_property(TARGET ${util}_static COMPILE_FLAGS "-fvisibility=hidden -fPIE")
add_space_separated_property(TARGET ${util}_static LINK_FLAGS -pie)
target_link_libraries(${util}_static ${LIBTOKUDB}_static lock_tree_static range_tree_static ft_static ${ZLIB_LIBRARIES} ${LIBTOKUPORTABILITY}_static ${CMAKE_THREAD_LIBS_INIT} dl)
target_link_libraries(${util}_static ${LIBTOKUDB}_static lock_tree_static range_tree_static ft_static z ${LIBTOKUPORTABILITY}_static ${CMAKE_THREAD_LIBS_INIT} dl)
set_targets_need_intel_libs(${util}_static)
if(BDB_FOUND)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment