endmacro()
macro(module_add_library MODULE_NAME )
-# add_definitions( -DMODULE=${MODULE_NAME} -fPIC)
add_library(${MODULE_NAME} ${MODULE_BUILD_TYPE} ${ARGN})
SET_TARGET_PROPERTIES(${MODULE_NAME} PROPERTIES COMPILE_DEFINITIONS "MODULE=${MODULE_NAME}")
SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES COMPILE_FLAGS ${NAVIT_COMPILE_FLAGS})
TARGET_LINK_LIBRARIES(${MODULE_NAME} navit_core)
install(TARGETS ${MODULE_NAME}
- DESTINATION ${LIB_DIR}/navit
+ DESTINATION ${LIB_DIR}/navit/${${MODULE_NAME}_TYPE}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif()
-# TARGET_LINK_LIBRARIES(${MODULE_NAME} ${NAVIT_SUPPORT_LIBS})
endmacro(module_add_library)
macro(supportlib_add_library LIB_NAME )
SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES COMPILE_FLAGS ${NAVIT_COMPILE_FLAGS})
TARGET_LINK_LIBRARIES(${MODULE_NAME} navit_core)
endif()
-# SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES COMPILE_DEFINITIONS "MODULE=${LIB_NAME}")
-
-# TARGET_LINK_LIBRARIES(${LIB_NAME} ${NAVIT_SUPPORT_LIBS})
endmacro(supportlib_add_library)
if (NOT USE_PLUGINS)
list(APPEND MODULES_NAME ${MODULE_INC})
+ else()
+ # set plugin_type
+ string(REGEX REPLACE "(^[^/]*)/.*" "\\1" ${MODULE_INC}_TYPE ${MODULE_PATH})
endif()
else()
message("Disabled ${MODULE_PATH} ( ${${MODULE_PATH}_REASON} )")