CMakeLists.txt 2.5 KB
Newer Older
W
wangguibao 已提交
1 2
add_custom_command(
        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/include/
W
wangguibao 已提交
3 4 5 6 7 8 9
        COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/ && cp ${CMAKE_CURRENT_LIST_DIR}/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/
        COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/utils && cp ${CMAKE_CURRENT_LIST_DIR}/utils/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/utils
        COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/alloc && cp ${CMAKE_CURRENT_LIST_DIR}/alloc/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/alloc
        COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/archive && cp ${CMAKE_CURRENT_LIST_DIR}/archive/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/archive
        # COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/containers && cp ${CMAKE_CURRENT_LIST_DIR}/containers/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/containers
        COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/check_cast && cp ${CMAKE_CURRENT_LIST_DIR}/check_cast/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/check_cast
        COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/ResourcePool && cp ${CMAKE_CURRENT_LIST_DIR}/ResourcePool/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/ResourcePool
W
wangguibao 已提交
10 11 12
        COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/var/ && cp ${CMAKE_CURRENT_LIST_DIR}/var/utils/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/var/
        COMMAND cp ${CMAKE_CURRENT_LIST_DIR}/var/interface/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/var/ 
        COMMAND cp ${CMAKE_CURRENT_LIST_DIR}/var/implement/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/var/ 
W
wangguibao 已提交
13
        COMMAND cp ${CMAKE_CURRENT_LIST_DIR}/check_cast/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl
W
wangguibao 已提交
14
        COMMAND cp ${CMAKE_CURRENT_LIST_DIR}/ResourcePool/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/ 
W
wangguibao 已提交
15
        )
W
wangguibao 已提交
16 17 18
add_custom_target(copy_bsl_headers
        DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/include/)

W
wangguibao 已提交
19
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
W
wangguibao 已提交
20 21
add_subdirectory(utils)
add_subdirectory(alloc)
W
wangguibao 已提交
22 23 24 25 26 27 28 29 30 31
add_subdirectory(archive)
add_subdirectory(containers)
add_subdirectory(pool)
add_subdirectory(buffer)
add_subdirectory(exception)
add_subdirectory(check_cast)
add_subdirectory(ResourcePool)
add_subdirectory(var/interface)
add_subdirectory(var/utils)
add_subdirectory(var/implement)
W
wangguibao 已提交
32
add_library(bsl)
W
wangguibao 已提交
33 34
add_dependencies(bsl utils alloc archive containers pool buffer exception
        check_cast ResourcePool interface var_utils implement)
W
wangguibao 已提交
35 36 37
target_link_libraries(bsl
        utils archive pool buffer exception check_cast
        ResourcePool var_utils implement)