提交 a211374d 编写于 作者: L liaogang

FIX: interface deps under cmake < 3.3

上级 ccb87a97
......@@ -17,8 +17,15 @@ ExternalProject_Add(
TEST_COMMAND ""
)
ADD_LIBRARY(lib_any INTERFACE)
ADD_DEPENDENCIES(lib_any extern_lib_any)
if (${CMAKE_VERSION} VERSION_LESS "3.3.0")
set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/lib_any_dummy.c)
file(WRITE ${dummyfile} "const char * dummy_any = \"${dummyfile}\";")
add_library(lib_any STATIC ${dummyfile})
else()
add_library(lib_any INTERFACE)
endif()
add_dependencies(lib_any extern_lib_any)
add_definitions(-DANY_IMPL_ANY_CAST_MOVEABLE)
LIST(APPEND external_project_dependencies extern_lib_any)
LIST(APPEND external_project_dependencies lib_any)
......@@ -26,7 +26,14 @@ ExternalProject_Add(
TEST_COMMAND ""
)
ADD_LIBRARY(eigen3 INTERFACE)
ADD_DEPENDENCIES(eigen3 extern_eigen3)
if (${CMAKE_VERSION} VERSION_LESS "3.3.0")
set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/eigen3_dummy.c)
file(WRITE ${dummyfile} "const char * dummy_eigen3 = \"${dummyfile}\";")
add_library(eigen3 STATIC ${dummyfile})
else()
add_library(eigen3 INTERFACE)
endif()
LIST(APPEND external_project_dependencies extern_eigen3)
add_dependencies(eigen3 extern_eigen3)
LIST(APPEND external_project_dependencies eigen3)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册