set(moddir ${CMAKE_CURRENT_SOURCE_DIR}) include(${moddir}/ModuleSetup.cmake OPTIONAL) file(GLOB srcs *.cpp) if(MODULE_${modname}_STATIC) set(STATIC_MODULES ${STATIC_MODULES} ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) else() include_directories(${MODULE_ADDITIONAL_INCLUDES}) add_library(${modname} MODULE ${srcs} ${MODULE_ADDITIONAL_SOURCES}) target_link_libraries(${modname} ${MODULE_ADDITIONAL_LIBRARIES}) endif()