On Friday 15 February 2013, Alexander Neundorf wrote: > Hi, > > any opinions abouut changing our library names to CamelCase, like > libKCoreAddons.so, together with the package named KCoreAddons ? > Right now it is libkcoreaddons, and the cmake variables for it are > kcoreaddons_FOUND, kcoreaddons_INCLUDE_DIRS etc. > > I'd prefer to CamelCase them. This would also be consistent with Qt. > We can do that step by step as the libs move from staging/ into tier[123]/. > > Comments ?
Attached is the patch which camelcases kplotting, so you can see what changes. If there are no objections, I'll do that for all the tier1 and tier2 libs in the next days and push them all at once. Alex
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0049ccd..20c8886 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,6 +86,11 @@ set(kcoreaddons_LIBRARIES kcoreaddons) set(kwindowsystem_LIBRARIES kwindowsystem) +set(KPlotting_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/tier1/kplotting/src/ + ${CMAKE_BINARY_DIR}/tier1/kplotting/src/ ) +set(KPlotting_LIBRARIES KPlotting) + + set(kconfig_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/tier2/kconfig/src/core ${CMAKE_BINARY_DIR}/tier2/kconfig/src/core ) set(kconfig_LIBRARIES kconfigcore kconfiggui) diff --git a/kdewidgets/CMakeLists.txt b/kdewidgets/CMakeLists.txt index 44888a6..1f53468 100644 --- a/kdewidgets/CMakeLists.txt +++ b/kdewidgets/CMakeLists.txt @@ -5,8 +5,7 @@ add_subdirectory( pics ) add_subdirectory( tests ) include_directories( - ${CMAKE_SOURCE_DIR}/tier1/kplotting/src - ${CMAKE_BINARY_DIR}/tier1/kplotting/src + ${KPlotting_INCLUDE_DIRS} ${kcoreaddons_SOURCE_DIR}/src/io # kurl.h ${kcoreaddons_SOURCE_DIR}/src/text # kmacroexpander.h ${kcoreaddons_BINARY_DIR}/src @@ -56,7 +55,7 @@ if(QT_QTDESIGNER_FOUND) kde4_add_plugin(kdewidgets ${kdewidgets_PART_SRCS}) - target_link_libraries(kdewidgets ${KDE4_KIO_LIBS} kplotting kwidgets kwidgetsaddons ki18n) + target_link_libraries(kdewidgets ${KDE4_KIO_LIBS} ${KPlotting_LIBRARIES} kwidgets kwidgetsaddons ki18n) if(NOT WIN32) set_target_properties(kdewidgets PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE diff --git a/tier1/kplotting/CMakeLists.txt b/tier1/kplotting/CMakeLists.txt index a1c3267..86e88ec 100644 --- a/tier1/kplotting/CMakeLists.txt +++ b/tier1/kplotting/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 2.8.10.1) -project(kplotting) +project(KPlotting) find_package(ECM 0.0.7 REQUIRED NO_MODULE) @@ -16,7 +16,7 @@ include(ECMSetupVersion) ecm_setup_version(5 0 0 VARIABLE_PREFIX KPLOTTING VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kplotting_version.h" - PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/kplottingConfigVersion.cmake") + PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KPlottingConfigVersion.cmake") add_subdirectory(src) @@ -24,19 +24,19 @@ add_subdirectory(examples) add_subdirectory(autotests) # create a Config.cmake and a ConfigVersion.cmake file and install them -set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/kplotting") +set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KPlotting") -configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/kplottingConfig.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/kplottingConfig.cmake" +configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/KPlottingConfig.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/KPlottingConfig.cmake" INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} PATH_VARS INCLUDE_INSTALL_DIR CMAKE_INSTALL_PREFIX ) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/kplottingConfig.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/kplottingConfigVersion.cmake" +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KPlottingConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/KPlottingConfigVersion.cmake" DESTINATION "${CMAKECONFIG_INSTALL_DIR}" COMPONENT Devel ) -install(EXPORT kplottingTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE kplottingTargets.cmake NAMESPACE KF5:: ) +install(EXPORT KPlottingTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KPlottingTargets.cmake NAMESPACE KF5:: ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kplotting_version.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel ) diff --git a/tier1/kplotting/autotests/CMakeLists.txt b/tier1/kplotting/autotests/CMakeLists.txt index 7676a17..60aea61 100644 --- a/tier1/kplotting/autotests/CMakeLists.txt +++ b/tier1/kplotting/autotests/CMakeLists.txt @@ -11,7 +11,7 @@ macro(KPLOTTING_UNIT_TESTS) foreach(_testname ${ARGN}) add_executable(${_testname} ${_testname}.cpp) add_test(kplotting-${_testname} ${_testname}) - target_link_libraries(${_testname} Qt5::Widgets ${QT_QTTEST_LIBRARY} ${QT_QTMAIN_LIBRARY} kplotting) + target_link_libraries(${_testname} Qt5::Widgets ${QT_QTTEST_LIBRARY} ${QT_QTMAIN_LIBRARY} KPlotting) ecm_mark_as_test(${_testname}) endforeach() endmacro() diff --git a/tier1/kplotting/examples/CMakeLists.txt b/tier1/kplotting/examples/CMakeLists.txt index 9753610..eebe224 100644 --- a/tier1/kplotting/examples/CMakeLists.txt +++ b/tier1/kplotting/examples/CMakeLists.txt @@ -5,4 +5,4 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src set(kplottest_SRCS testplot_widget.cpp testplot_main.cpp) add_executable(kplottest ${kplottest_SRCS}) -target_link_libraries(kplottest kplotting Qt5::Widgets ${QT_QTMAIN_LIBRARY}) +target_link_libraries(kplottest KPlotting Qt5::Widgets ${QT_QTMAIN_LIBRARY}) diff --git a/tier1/kplotting/src/CMakeLists.txt b/tier1/kplotting/src/CMakeLists.txt index 1132248..7ce75bd 100644 --- a/tier1/kplotting/src/CMakeLists.txt +++ b/tier1/kplotting/src/CMakeLists.txt @@ -7,16 +7,16 @@ set(kplotting_SRCS kplotwidget.cpp ) -add_library(kplotting ${kplotting_SRCS}) -generate_export_header(kplotting) +add_library(KPlotting ${kplotting_SRCS}) +generate_export_header(KPlotting) -target_link_libraries(kplotting Qt5::Widgets) +target_link_libraries(KPlotting Qt5::Widgets) -set_target_properties(kplotting PROPERTIES VERSION ${KPLOTTING_VERSION_STRING} +set_target_properties(KPlotting PROPERTIES VERSION ${KPLOTTING_VERSION_STRING} SOVERSION ${KPLOTTING_SOVERSION} ) -install(TARGETS kplotting EXPORT kplottingTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS KPlotting EXPORT KPlottingTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) install( FILES kplotaxis.h
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel