Commit 366e847e authored by Leif Walsh's avatar Leif Walsh

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

parent db33a7c7
...@@ -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
FILES "${CMAKE_CURRENT_BINARY_DIR}/db.h" if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
DESTINATION include install(
RENAME tokudb.h FILES "${CMAKE_CURRENT_BINARY_DIR}/db.h"
) DESTINATION include
install( RENAME tokudb.h
FILES "${CMAKE_CURRENT_BINARY_DIR}/db.h" )
DESTINATION include install(
) FILES "${CMAKE_CURRENT_BINARY_DIR}/db.h"
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
DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib" if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
DESTINATION . install(
) DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib"
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
FILES if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
db-insert.c install(
db-insert-multiple.c FILES
db-scan.c db-insert.c
db-update.c db-insert-multiple.c
Makefile db-scan.c
README.examples db-update.c
DESTINATION Makefile
examples README.examples
) DESTINATION
\ No newline at end of file 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
FILES toku_os_types.h toku_time.h if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
DESTINATION include install(
) FILES toku_os_types.h toku_time.h
install( DESTINATION include
TARGETS ${LIBTOKUPORTABILITY} ${LIBTOKUPORTABILITY}_static )
DESTINATION lib install(
) TARGETS ${LIBTOKUPORTABILITY} ${LIBTOKUPORTABILITY}_static
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
TARGETS ${LIBTOKUDB} ${LIBTOKUDB}_static if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
DESTINATION lib install(
) TARGETS ${LIBTOKUDB} ${LIBTOKUDB}_static
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
FILES toku_list.h toku_os.h if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
DESTINATION include install(
) FILES toku_list.h toku_os.h
install( DESTINATION include
FILES "${CMAKE_CURRENT_BINARY_DIR}/toku_config.h" )
DESTINATION include install(
) FILES "${CMAKE_CURRENT_BINARY_DIR}/toku_config.h"
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
FILES partitioned_counter.h if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
DESTINATION include install(
) FILES partitioned_counter.h
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