Commit d0f7807a authored by Jan Möbius's avatar Jan Möbius
Browse files

Optional toplevel deps will also get enable definition if found

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12192 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 2405d259
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# #
# DIRS = additional directories with source files # DIRS = additional directories with source files
# DEPS = required dependencies for find_package macro # DEPS = required dependencies for find_package macro
# OPTDEPS = optional dependencies for find_package macro # OPTDEPS = optional dependencies for find_package macro, if found, define ENABLE_<Depname> will be set
# LDFLAGSADD = flags added to the link command # LDFLAGSADD = flags added to the link command
# CFLAGSADD = flags added to the compile command # CFLAGSADD = flags added to the compile command
# LIBRARIES = libraries added to link command # LIBRARIES = libraries added to link command
...@@ -162,7 +162,11 @@ macro (_check_plugin_deps _prefix _optional ) ...@@ -162,7 +162,11 @@ macro (_check_plugin_deps _prefix _optional )
if ( ${_optional} STREQUAL "TRUE" ) if ( ${_optional} STREQUAL "TRUE" )
if ( ${_VAL}_FOUND ) if ( ${_VAL}_FOUND )
message("Info optional dependency ${_VAL} for ${_prefix} not found .. proceeding without it!")
# Optional dependency found and recursive found, so add definition to enable it
if ( ${_optional} STREQUAL "TRUE" )
add_definitions(-DENABLE_${_VAL})
endif()
if ( ALL_REQUIRED_DEPENDENCIES_FOUND ) if ( ALL_REQUIRED_DEPENDENCIES_FOUND )
# All found so add package dependencies # All found so add package dependencies
...@@ -598,7 +602,7 @@ function (_build_openflipper_plugin plugin) ...@@ -598,7 +602,7 @@ function (_build_openflipper_plugin plugin)
target_link_libraries(Plugin-${plugin} ${_PLUGIN}_cuda_lib) target_link_libraries(Plugin-${plugin} ${_PLUGIN}_cuda_lib)
# reset to original compile definitions # reset to original compile definitions
set_directory_properties( PROPERTIES COMPILE_DEFINITIONS ${CURRENT_DEFINITIONS} ) set_directory_properties( PROPERTIES COMPILE_DEFINITIONS "${CURRENT_DEFINITIONS}" )
endif( CUDA_FOUND ) endif( CUDA_FOUND )
endif() endif()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment