Commit eac88be1 authored by Leif Walsh's avatar Leif Walsh

#6 don't do cmake install if we're a subproject of mysql

parent e4c6535d
...@@ -13,12 +13,15 @@ add_custom_command( ...@@ -13,12 +13,15 @@ add_custom_command(
add_custom_target(install_tdb_h DEPENDS add_custom_target(install_tdb_h DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/db.h") "${CMAKE_CURRENT_BINARY_DIR}/db.h")
install( # detect when we are being built as a subproject
if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/db.h" FILES "${CMAKE_CURRENT_BINARY_DIR}/db.h"
DESTINATION include DESTINATION include
RENAME tokudb.h RENAME tokudb.h
) )
install( install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/db.h" FILES "${CMAKE_CURRENT_BINARY_DIR}/db.h"
DESTINATION include DESTINATION include
) )
endif ()
\ No newline at end of file
...@@ -27,10 +27,13 @@ set_target_properties(jemalloc_nopic PROPERTIES IMPORTED_LOCATION ...@@ -27,10 +27,13 @@ set_target_properties(jemalloc_nopic PROPERTIES IMPORTED_LOCATION
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc.a") "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc.a")
add_dependencies(jemalloc_nopic build_jemalloc) add_dependencies(jemalloc_nopic build_jemalloc)
install( # detect when we are being built as a subproject
if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
install(
DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib" DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib"
DESTINATION . DESTINATION .
) )
endif ()
## add lzma with an external project ## add lzma with an external project
set(xz_configure_opts --with-pic --enable-static) set(xz_configure_opts --with-pic --enable-static)
......
install( # detect when we are being built as a subproject
if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
install(
FILES FILES
db-insert.c db-insert.c
db-insert-multiple.c db-insert-multiple.c
...@@ -9,3 +11,4 @@ install( ...@@ -9,3 +11,4 @@ install(
DESTINATION DESTINATION
examples examples
) )
endif ()
\ No newline at end of file
...@@ -29,13 +29,16 @@ set_property(TARGET ${LIBTOKUPORTABILITY} tokuportability_static_conv APPEND PRO ...@@ -29,13 +29,16 @@ set_property(TARGET ${LIBTOKUPORTABILITY} tokuportability_static_conv APPEND PRO
set_property(SOURCE file memory os_malloc portability toku_assert toku_rwlock APPEND PROPERTY set_property(SOURCE file memory os_malloc portability toku_assert toku_rwlock APPEND PROPERTY
COMPILE_DEFINITIONS TOKU_ALLOW_DEPRECATED=1) COMPILE_DEFINITIONS TOKU_ALLOW_DEPRECATED=1)
install( # detect when we are being built as a subproject
if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
install(
FILES toku_os_types.h toku_time.h FILES toku_os_types.h toku_time.h
DESTINATION include DESTINATION include
) )
install( install(
TARGETS ${LIBTOKUPORTABILITY} ${LIBTOKUPORTABILITY}_static TARGETS ${LIBTOKUPORTABILITY} ${LIBTOKUPORTABILITY}_static
DESTINATION lib DESTINATION lib
) )
endif ()
add_subdirectory(tests) add_subdirectory(tests)
...@@ -39,9 +39,12 @@ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) ...@@ -39,9 +39,12 @@ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
add_space_separated_property(TARGET ${LIBTOKUDB} LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/export.map") add_space_separated_property(TARGET ${LIBTOKUDB} LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/export.map")
endif () endif ()
install( # detect when we are being built as a subproject
if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
install(
TARGETS ${LIBTOKUDB} ${LIBTOKUDB}_static TARGETS ${LIBTOKUDB} ${LIBTOKUDB}_static
DESTINATION lib DESTINATION lib
) )
endif ()
add_subdirectory(tests) add_subdirectory(tests)
...@@ -2,11 +2,14 @@ configure_file(toku_config.h.in toku_config.h) ...@@ -2,11 +2,14 @@ configure_file(toku_config.h.in toku_config.h)
add_custom_target(generate_config_h DEPENDS add_custom_target(generate_config_h DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/toku_config.h") "${CMAKE_CURRENT_BINARY_DIR}/toku_config.h")
install( # detect when we are being built as a subproject
if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
install(
FILES toku_list.h toku_os.h FILES toku_list.h toku_os.h
DESTINATION include DESTINATION include
) )
install( install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/toku_config.h" FILES "${CMAKE_CURRENT_BINARY_DIR}/toku_config.h"
DESTINATION include DESTINATION include
) )
endif ()
\ No newline at end of file
...@@ -14,9 +14,12 @@ target_link_libraries(util LINK_PUBLIC ${CMAKE_THREAD_LIBS_INIT} ${EXTRA_SYSTEM_ ...@@ -14,9 +14,12 @@ target_link_libraries(util LINK_PUBLIC ${CMAKE_THREAD_LIBS_INIT} ${EXTRA_SYSTEM_
add_dependencies(util install_tdb_h) add_dependencies(util install_tdb_h)
add_dependencies(util_static install_tdb_h) add_dependencies(util_static install_tdb_h)
install( # detect when we are being built as a subproject
if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
install(
FILES partitioned_counter.h FILES partitioned_counter.h
DESTINATION include DESTINATION include
) )
endif ()
add_subdirectory(tests) add_subdirectory(tests)
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