Skip to content

Commit

Permalink
Ensure that plugins are output in the correct directory
Browse files Browse the repository at this point in the history
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 Apr 3, 2016
1 parent 1c5533e commit d54d325
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmake/modules/GrantleeMacros.cmake
Expand Up @@ -8,4 +8,12 @@ macro(grantlee_adjust_plugin_name pluginname)
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/grantlee/${Grantlee5_VERSION_MAJOR}.${Grantlee5_VERSION_MINOR}" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/grantlee/${Grantlee5_VERSION_MAJOR}.${Grantlee5_VERSION_MINOR}"
DEBUG_POSTFIX "d" 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() endmacro()

0 comments on commit d54d325

Please sign in to comment.