Hi folks,
I am trying to merge our project that uses MITK as library to the latest release v2014.03.0.
So far I have some problems with some modules that implement interactors of the new type and thus uses resources that are to be embeded by using a >usFunctionEmbedResources< cppMicroService call.
As this doesn't work as it did with 2013.12.0 I narrowed it down to the variable
${resource_compiler}
that is first set to ${US_RCC_EXECUTABLE} (which contains the right path) but then is set to ${US_RCC_EXECUTABLE_NAME} which is empty!
Entire section in \Core\CppMicroServices\cmake\usFunctionEmbedResources.cmake ln 137ff:
set(resource_compiler ${US_RCC_EXECUTABLE}) # sets it right
if(TARGET ${US_RCC_EXECUTABLE_NAME})
set(resource_compiler ${US_RCC_EXECUTABLE_NAME}) #is called and sets it to ""
elseif(NOT resource_compiler)
message(FATAL_ERROR "The CppMicroServices resource compiler was not found. Check the US_RCC_EXECUTABLE CMake variable.")
endif()
if(TARGET ${US_RCC_EXECUTABLE_NAME})
set(resource_compiler ${US_RCC_EXECUTABLE_NAME}) #is called and sets it to ""
elseif(NOT resource_compiler)
message(FATAL_ERROR "The CppMicroServices resource compiler was not found. Check the US_RCC_EXECUTABLE CMake variable.")
endif()
------
What is that line good for?
The result of that call is that no file called <module-name>_resources.cpp is generated. Also no error is returned.
------
my CmakeLists.txt from that module looks like:
....
# registering as mitk module with MicroService functionality to use us::ModuleRegistry::GetModule("landmark") in code and to reach interaction patterns
# set template file
set(US_MODULE_INIT_TEMPLATE ${MITK_SOURCE_DIR}/Core/CppMicroServices/CMake/usModuleInit.cpp)
# include the macro
include(${MITK_SOURCE_DIR}/Core/CppMicroServices/CMake/usFunctionGenerateModuleInit.cmake)
# call macro to generate micro service landmark_init.cpp file
usFunctionGenerateModuleInit(CPP_FILES
NAME ${PROJECT_NAME}
LIBRARY_NAME ${PROJECT_NAME}
)
# processing of MITK resources
set(GENERATED_MITK_RESOURCES)
# include the macro
include(${MITK_SOURCE_DIR}/Core/CppMicroServices/CMake/usFunctionEmbedResources.cmake)
# call macro to handle mitk resources
usFunctionEmbedResources(GENERATED_MITK_RESOURCES
LIBRARY_NAME ${PROJECT_NAME}
ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Resources
FILES ${MITK_RESOURCE_FILES}
)
#######################################################
#
# Continuing to define libary to build
#
#######################################################
add_library(${PROJECT_NAME} SHARED ${CPP_FILES} ${H_FILES} ${QRC_FILES} ${GENERATED_MITK_RESOURCES})
# set template file
set(US_MODULE_INIT_TEMPLATE ${MITK_SOURCE_DIR}/Core/CppMicroServices/CMake/usModuleInit.cpp)
# include the macro
include(${MITK_SOURCE_DIR}/Core/CppMicroServices/CMake/usFunctionGenerateModuleInit.cmake)
# call macro to generate micro service landmark_init.cpp file
usFunctionGenerateModuleInit(CPP_FILES
NAME ${PROJECT_NAME}
LIBRARY_NAME ${PROJECT_NAME}
)
# processing of MITK resources
set(GENERATED_MITK_RESOURCES)
# include the macro
include(${MITK_SOURCE_DIR}/Core/CppMicroServices/CMake/usFunctionEmbedResources.cmake)
# call macro to handle mitk resources
usFunctionEmbedResources(GENERATED_MITK_RESOURCES
LIBRARY_NAME ${PROJECT_NAME}
ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Resources
FILES ${MITK_RESOURCE_FILES}
)
#######################################################
#
# Continuing to define libary to build
#
#######################################################
add_library(${PROJECT_NAME} SHARED ${CPP_FILES} ${H_FILES} ${QRC_FILES} ${GENERATED_MITK_RESOURCES})
...
-----
Looking into what has changed for v2014.03.0 didn't bring up anything good.
???
Best Regards and 'Happy BugSquashing'!
Ingmar
------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users