build BUGFIX support for cmake 2.8.12
+include(CMakeParseArguments)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
@@ -5,12 +6,12 @@ function(ly_add_plugin)
cmake_parse_arguments(ADDPLUGIN "" "NAME" "SOURCES" ${ARGN})
set(PLUGIN_NAME plugin_${ADDPLUGIN_NAME})
- add_library(${PLUGIN_NAME} MODULE)
- set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
foreach(PLUGIN_SOURCE ${ADDPLUGIN_SOURCES})
- target_sources(${PLUGIN_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_SOURCE})
+ list(APPEND PLUGIN_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_SOURCE})
endforeach()
+ add_library(${PLUGIN_NAME} MODULE ${PLUGIN_SOURCES})
+ set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} yang)
endfunction(ly_add_plugin)
