Permalink
Browse files

Ensure that plugins are output in the correct directory

Grantlee requires that the plugins be in

 prefix/grantlee/$version/

but without these settings, cmake instead puts the plugins in

 prefix/grantlee/$version/{Debug,Release}
  • Loading branch information...
steveire committed Mar 29, 2016
1 parent 1c5533e commit d54d32575837d297211ad09da799bffca139709c
Showing with 8 additions and 0 deletions.
  1. +8 −0 cmake/modules/GrantleeMacros.cmake
@@ -8,4 +8,12 @@ macro(grantlee_adjust_plugin_name pluginname)
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/grantlee/${Grantlee5_VERSION_MAJOR}.${Grantlee5_VERSION_MINOR}"
DEBUG_POSTFIX "d"
)
foreach(cfg ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${cfg} CFG)
set_target_properties(${pluginname}
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY_${CFG} "${CMAKE_BINARY_DIR}/grantlee/${Grantlee5_VERSION_MAJOR}.${Grantlee5_VERSION_MINOR}"
RUNTIME_OUTPUT_DIRECTORY_${CFG} "${CMAKE_BINARY_DIR}/grantlee/${Grantlee5_VERSION_MAJOR}.${Grantlee5_VERSION_MINOR}"
)
endforeach()
endmacro()

0 comments on commit d54d325

Please sign in to comment.