ctkFunctionGeneratePluginUseFile.cmake 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ###########################################################################
  2. #
  3. # Library: CTK
  4. #
  5. # Copyright (c) German Cancer Research Center,
  6. # Division of Medical and Biological Informatics
  7. #
  8. # Licensed under the Apache License, Version 2.0 (the "License");
  9. # you may not use this file except in compliance with the License.
  10. # You may obtain a copy of the License at
  11. #
  12. # http://www.apache.org/licenses/LICENSE-2.0
  13. #
  14. # Unless required by applicable law or agreed to in writing, software
  15. # distributed under the License is distributed on an "AS IS" BASIS,
  16. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. # See the License for the specific language governing permissions and
  18. # limitations under the License.
  19. #
  20. ###########################################################################
  21. # Write a set of variables containing CTK plugin specific include and library directories
  22. FUNCTION(ctkFunctionGeneratePluginUseFile filename)
  23. IF(COMMAND GetMyTargetLibraries)
  24. GetMyTargetLibraries("${CTK_PLUGIN_LIBRARIES}" my_ctk_plugin_libraries)
  25. ELSE()
  26. SET(my_ctk_plugin_libraries ${CTK_PLUGIN_LIBRARIES})
  27. ENDIF()
  28. SET(CTK_PLUGIN_INCLUDE_DIRS_CONFIG)
  29. FOREACH(plugin ${my_ctk_plugin_libraries})
  30. SET(${plugin}_INCLUDE_DIRS ${${plugin}_SOURCE_DIR} ${${plugin}_BINARY_DIR})
  31. ctkFunctionGetIncludeDirs(${plugin}_INCLUDE_DIRS ${plugin})
  32. SET(CTK_PLUGIN_INCLUDE_DIRS_CONFIG "${CTK_PLUGIN_INCLUDE_DIRS_CONFIG}
  33. SET(${plugin}_INCLUDE_DIRS \"${${plugin}_INCLUDE_DIRS}\")")
  34. ctkFunctionGetLibraryDirs(${plugin}_LIBRARY_DIRS ${plugin})
  35. SET(CTK_PLUGIN_LIBRARY_DIRS_CONFIG "${CTK_PLUGIN_LIBRARY_DIRS_CONFIG}
  36. SET(${plugin}_LIBRARY_DIRS \"${${plugin}_LIBRARY_DIRS}\")")
  37. ENDFOREACH()
  38. CONFIGURE_FILE("${CTK_CMAKE_DIR}/../CTKPluginUseFile.cmake.in" "${filename}" @ONLY)
  39. ENDFUNCTION()