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(
add_custom_target(install_tdb_h DEPENDS
"${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"
DESTINATION include
RENAME tokudb.h
)
install(
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
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc.a")
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"
DESTINATION .
)
endif ()
## add lzma with an external project
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
db-insert.c
db-insert-multiple.c
......@@ -9,3 +11,4 @@ install(
DESTINATION
examples
)
endif ()
\ No newline at end of file
......@@ -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
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
DESTINATION include
)
install(
install(
TARGETS ${LIBTOKUPORTABILITY} ${LIBTOKUPORTABILITY}_static
DESTINATION lib
)
endif ()
add_subdirectory(tests)
......@@ -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")
endif ()
install(
# detect when we are being built as a subproject
if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
install(
TARGETS ${LIBTOKUDB} ${LIBTOKUDB}_static
DESTINATION lib
)
endif ()
add_subdirectory(tests)
......@@ -2,11 +2,14 @@ configure_file(toku_config.h.in toku_config.h)
add_custom_target(generate_config_h DEPENDS
"${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
DESTINATION include
)
install(
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_
add_dependencies(util 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
DESTINATION include
)
endif ()
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