CMakeLists.txt 2.3 KB
Newer Older
W
wangguibao 已提交
1 2 3 4 5 6 7 8 9
add_custom_target(copy_bsl_headers)
add_custom_command(TARGET copy_bsl_headers
        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
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
W
wangguibao 已提交
17 18
add_subdirectory(utils)
add_subdirectory(alloc)
W
wangguibao 已提交
19 20 21 22 23 24 25 26 27 28
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 已提交
29 30 31
add_custom_target(bsl)
add_dependencies(bsl utils alloc archive containers pool buffer exception
        check_cast ResourcePool interface var_utils implement)