Skip to content

Commit

Permalink
Bump the version to 5.0.0.
Browse files Browse the repository at this point in the history
Rename the CMake package and IMPORTED targets to Grantlee5.
  • Loading branch information
steveire committed Sep 22, 2014
1 parent 8297683 commit 0172e8d
Show file tree
Hide file tree
Showing 18 changed files with 53 additions and 37 deletions.
22 changes: 11 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
set(CMAKE_AUTOMOC ON)

set(Grantlee_VERSION_MAJOR 0)
set(Grantlee_VERSION_MINOR 5)
set(Grantlee_VERSION_PATCH 1)
set(Grantlee_MIN_PLUGIN_VERSION 1)
set(Grantlee_VERSION_MAJOR 5)
set(Grantlee_VERSION_MINOR 0)
set(Grantlee_VERSION_PATCH 0)
set(Grantlee_MIN_PLUGIN_VERSION 0)

set(Grantlee_MAJOR_MINOR_VERSION_STRING "${Grantlee_VERSION_MAJOR}.${Grantlee_VERSION_MINOR}" )
set(Grantlee_VERSION_STRING "${Grantlee_VERSION_MAJOR}.${Grantlee_VERSION_MINOR}.${Grantlee_VERSION_PATCH}" )
Expand All @@ -111,23 +111,23 @@ if (BUILD_TEXTDOCUMENT)
add_subdirectory(textdocument)
endif()

set(CMAKECONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/grantlee" )
set(CMAKECONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/Grantlee${Grantlee_VERSION_MAJOR}" )

configure_file(
"${Grantlee_MODULE_DIR}/GrantleeConfig.cmake.in"
"${Grantlee_BINARY_DIR}/GrantleeConfig.cmake"
"${Grantlee_MODULE_DIR}/Grantlee${Grantlee_VERSION_MAJOR}Config.cmake.in"
"${Grantlee_BINARY_DIR}/Grantlee${Grantlee_VERSION_MAJOR}Config.cmake"
@ONLY
)

include(CMakePackageConfigHelpers)
write_basic_package_version_file("${Grantlee_BINARY_DIR}/GrantleeConfigVersion.cmake"
write_basic_package_version_file("${Grantlee_BINARY_DIR}/Grantlee${Grantlee_VERSION_MAJOR}ConfigVersion.cmake"
VERSION ${Grantlee_VERSION_STRING}
COMPATIBILITY AnyNewerVersion
)

install(FILES
"${Grantlee_BINARY_DIR}/GrantleeConfig.cmake"
"${Grantlee_BINARY_DIR}/GrantleeConfigVersion.cmake"
"${Grantlee_BINARY_DIR}/Grantlee${Grantlee_VERSION_MAJOR}Config.cmake"
"${Grantlee_BINARY_DIR}/Grantlee${Grantlee_VERSION_MAJOR}ConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Common
)
Expand All @@ -140,7 +140,7 @@ install(FILES

install(EXPORT grantlee_targets
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
NAMESPACE Grantlee::
NAMESPACE Grantlee${Grantlee_VERSION_MAJOR}::
FILE GrantleeTargets.cmake
COMPONENT Common
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# Any changes in this file will be overwritten by CMake.

if (Grantlee_FIND_COMPONENTS)
foreach( component ${Grantlee_FIND_COMPONENTS})
if (Grantlee@Grantlee_VERSION_MAJOR@_FIND_COMPONENTS)
foreach( component ${Grantlee@Grantlee_VERSION_MAJOR@_FIND_COMPONENTS})
if (component STREQUAL "Textdocument")
set(RequiredQtComponents ${RequiredQtComponents} Gui)
endif()
Expand Down
20 changes: 18 additions & 2 deletions dox/porting.dox
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,30 @@ namespace Grantlee
Idiomatic use of %Grantlee in the buildsystem is now similar to:

@verbatim
find_package(Grantlee REQUIRED)
find_package(Grantlee5 REQUIRED)

add_executable(main main.cpp)
target_link_libraries(main
Grantlee::Templates
Grantlee5::Templates
)
@endverbatim

@subsection package_numbered CMake Package name changed

The previous major release of %Grantlee shipped a CMake package findable
with

@verbatim
find_package(Grantlee REQUIRED)
@endverbatim

For %Grantlee 5.0 the package was renamed to include the major version
number:

@verbatim
find_package(Grantlee5 REQUIRED)
@endverbatim

@section cpp_porting C++ porting

@subsection initialize_removed GRANTLEE_METATYPE_INITIALIZE macro removed
Expand Down
6 changes: 3 additions & 3 deletions dox/using_and_deploying.dox
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Grantlee

@section finding_with_cmake Finding Grantlee with CMake

%Grantlee uses the <a href="http://www.cmake.org/">CMake</a> cross platform build system, and installs a cmake file called GrantleeConfig.cmake. This config file is automatically searched for by CMake and contains the information needed for other CMake based applications to find headers and link against %Grantlee libraries.
%Grantlee uses the <a href="http://www.cmake.org/">CMake</a> cross platform build system, and installs a cmake file called Grantlee5Config.cmake. This config file is automatically searched for by CMake and contains the information needed for other CMake based applications to find headers and link against %Grantlee libraries.

When creating an application using CMake that depends on %Grantlee, first issue the find_package command, and then use the CMake <tt>target_link_libraries</tt> command link to and use the libraries.

Expand All @@ -30,14 +30,14 @@ namespace Grantlee
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

find_package(Grantlee REQUIRED)
find_package(Grantlee5 REQUIRED)

# ... Application sources etc.

target_link_libraries(
my_application
Qt5::Widgets
Grantlee::Templates
Grantlee5::Templates
)
@endcode

Expand Down
4 changes: 2 additions & 2 deletions examples/books/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(books_grantlee)

cmake_minimum_required(VERSION 3.0)

find_package(Grantlee REQUIRED)
find_package(Grantlee5 REQUIRED)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
Expand All @@ -29,7 +29,7 @@ add_executable(books

target_link_libraries(
books
Grantlee::Templates
Grantlee5::Templates
Qt5::Widgets
Qt5::Sql

Expand Down
6 changes: 3 additions & 3 deletions examples/codegen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(codegen_grantlee)

cmake_minimum_required(VERSION 3.0)

find_package(Grantlee REQUIRED)
find_package(Grantlee5 REQUIRED)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
Expand All @@ -19,7 +19,7 @@ configure_file(grantlee_paths.h.cmake ${PROJECT_BINARY_DIR}/grantlee_paths.h)
qt5_add_resources(
codegen_example_RCS_SRCS
custom_tags.qrc
OPTIONS -root "/plugins/grantlee/${Grantlee_VERSION_MAJOR}.${Grantlee_VERSION_MINOR}/"
OPTIONS -root "/plugins/grantlee/${Grantlee5_VERSION_MAJOR}.${Grantlee5_VERSION_MINOR}/"
)

add_executable(codegen
Expand All @@ -39,6 +39,6 @@ find_package(Qt5Widgets REQUIRED)

target_link_libraries(
codegen
Grantlee::Templates
Grantlee5::Templates
Qt5::Widgets
)
4 changes: 2 additions & 2 deletions examples/contacts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(contacts_grantlee)

cmake_minimum_required(VERSION 2.8.11)

find_package(Grantlee REQUIRED)
find_package(Grantlee5 REQUIRED)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
Expand All @@ -24,7 +24,7 @@ find_package(Qt5LinguistTools REQUIRED)

target_link_libraries(
contacts_linguist
Grantlee::Templates
Grantlee5::Templates
Qt5::WebKitWidgets
)

Expand Down
4 changes: 2 additions & 2 deletions examples/htmlapps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.11)

project(htmlapps)

find_package(Grantlee REQUIRED)
find_package(Grantlee5 REQUIRED)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
Expand All @@ -24,7 +24,7 @@ grantlee_adjust_plugin_name(customplugin)
find_package(Qt5 REQUIRED XmlPatterns Network)

target_link_libraries(customplugin
Grantlee::Templates
Grantlee5::Templates
Qt5::XmlPatterns
Qt5::Network
)
Expand Down
2 changes: 1 addition & 1 deletion examples/textedit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(textedit_grantlee)

cmake_minimum_required(VERSION 3.0)

find_package(Grantlee REQUIRED)
find_package(Grantlee5 REQUIRED)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
Expand Down
2 changes: 1 addition & 1 deletion templates/defaultfilters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ add_library(grantlee_defaultfilters MODULE
stringfilters.cpp
)
set_property(TARGET grantlee_defaultfilters PROPERTY EXPORT_NAME defaultfilters)
target_link_libraries(grantlee_defaultfilters Grantlee::Templates)
target_link_libraries(grantlee_defaultfilters Grantlee5::Templates)
grantlee_adjust_plugin_name(grantlee_defaultfilters)

install(TARGETS grantlee_defaultfilters EXPORT grantlee_targets
Expand Down
2 changes: 1 addition & 1 deletion templates/defaulttags/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ add_library(grantlee_defaulttags MODULE
with.cpp
)
set_property(TARGET grantlee_defaulttags PROPERTY EXPORT_NAME defaulttags)
target_link_libraries(grantlee_defaulttags Grantlee::Templates)
target_link_libraries(grantlee_defaulttags Grantlee5::Templates)
grantlee_adjust_plugin_name(grantlee_defaulttags)

install(TARGETS grantlee_defaulttags EXPORT grantlee_targets
Expand Down
2 changes: 1 addition & 1 deletion templates/i18n/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ add_library(grantlee_i18ntags MODULE
with_locale.cpp
)
set_property(TARGET grantlee_i18ntags PROPERTY EXPORT_NAME i18ntags)
target_link_libraries(grantlee_i18ntags Grantlee::Templates)
target_link_libraries(grantlee_i18ntags Grantlee5::Templates)
grantlee_adjust_plugin_name(grantlee_i18ntags)

install(TARGETS grantlee_i18ntags EXPORT grantlee_targets
Expand Down
2 changes: 1 addition & 1 deletion templates/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ add_library(Grantlee_Templates SHARED
${grantlee_templates_SRCS}
${scriptabletags_SRCS}
)
add_library(Grantlee::Templates ALIAS Grantlee_Templates)
add_library(Grantlee5::Templates ALIAS Grantlee_Templates)
generate_export_header(Grantlee_Templates)
set_property(TARGET Grantlee_Templates PROPERTY EXPORT_NAME Templates)
target_include_directories(Grantlee_Templates PRIVATE ../scriptabletags)
Expand Down
2 changes: 1 addition & 1 deletion templates/loadertags/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ add_library(grantlee_loadertags MODULE
include.cpp
)
set_property(TARGET grantlee_loadertags PROPERTY EXPORT_NAME loadertags)
target_link_libraries(grantlee_loadertags Grantlee::Templates)
target_link_libraries(grantlee_loadertags Grantlee5::Templates)
grantlee_adjust_plugin_name(grantlee_loadertags)

install(TARGETS grantlee_loadertags EXPORT grantlee_targets
Expand Down
2 changes: 1 addition & 1 deletion templates/scriptabletags/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ add_library(grantlee_scriptabletags MODULE
grantlee_adjust_plugin_name(grantlee_scriptabletags)

target_link_libraries(grantlee_scriptabletags
Grantlee::Templates
Grantlee5::Templates
Qt4::QtScript
)

Expand Down
2 changes: 1 addition & 1 deletion templates/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ macro(GRANTLEE_TEMPLATES_UNIT_TESTS)
${_testname}.cpp
)
add_test(${_testname} ${_testname}_exec )
target_link_libraries(${_testname}_exec Grantlee::Templates template_test_builtins)
target_link_libraries(${_testname}_exec Grantlee5::Templates template_test_builtins)

set_property(GLOBAL APPEND PROPERTY TEST_COVERAGE "${CMAKE_CURRENT_BINARY_DIR}/${_testname}_exec" )
endforeach(_testname)
Expand Down
2 changes: 1 addition & 1 deletion templates/tests/pluginpointertest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ target_link_libraries(myplugin
add_executable(main_app main.cpp ${myplugin_sources} ${_plugin_moc_srcs})
target_include_directories(main_app
PRIVATE
$<TARGET_PROPERTY:Grantlee::Templates,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:Grantlee5::Templates,INTERFACE_INCLUDE_DIRECTORIES>
)
target_link_libraries(main_app
Qt5::Core
Expand Down
2 changes: 1 addition & 1 deletion templates/tests/templatedirs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(template_dirs_test)

cmake_minimum_required(VERSION 2.8.11)

find_package(Grantlee REQUIRED)
find_package(Grantlee5 REQUIRED)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

configure_file(grantlee_paths.h.cmake ${PROJECT_BINARY_DIR}/grantlee_paths.h)
Expand Down

0 comments on commit 0172e8d

Please sign in to comment.