mirror of
https://github.com/QuasarApp/CopyrightFixer.git
synced 2025-04-26 01:34:40 +00:00
ref #37 "fix cmake lists"
This commit is contained in:
parent
a528e1f37e
commit
a99384025f
1
.gitignore
vendored
1
.gitignore
vendored
@ -65,3 +65,4 @@ compile_commands.json
|
||||
CTestTestfile.cmake
|
||||
_deps
|
||||
*_autogen*
|
||||
build/
|
||||
|
@ -12,16 +12,8 @@ if(TARGET ${PROJECT_NAME})
|
||||
return()
|
||||
endif()
|
||||
|
||||
set (QT_VERSION_MAJOR OFF)
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Test QUIET)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Test QUIET)
|
||||
|
||||
include(./submodules/QuasarAppLib/CMake/ccache.cmake)
|
||||
include(./submodules/QuasarAppLib/CMake/QuasarAppCITargets.cmake)
|
||||
|
||||
# Add sub directories
|
||||
add_subdirectory(src)
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
|
||||
|
||||
|
||||
if (NOT DEFINED COPYRIGHT_FIXER_TESTS)
|
||||
@ -37,11 +29,34 @@ if (NOT DEFINED COPYRIGHT_FIXER_TESTS)
|
||||
set(COPYRIGHT_FIXER_TESTS OFF)
|
||||
endif()
|
||||
|
||||
if (NOT QT_VERSION_MAJOR)
|
||||
set(COPYRIGHT_FIXER_TESTS OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED COPYRIGHT_FIXER_TOOL)
|
||||
set(COPYRIGHT_FIXER_TOOL ON)
|
||||
endif()
|
||||
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
include(submodules/QuasarAppLib/CMake/ccache.cmake)
|
||||
include(submodules/QuasarAppLib/CMake/QuasarAppCITargets.cmake)
|
||||
include(submodules/QuasarAppLib/CMake/ProjectOut.cmake)
|
||||
include(submodules/QuasarAppLib/CMake/Version.cmake)
|
||||
include(submodules/QuasarAppLib/CMake/QtUtils.cmake)
|
||||
include(submodules/QuasarAppLib/CMake/crossplatform/crossplatform.cmake)
|
||||
|
||||
add_subdirectory(submodules/QuasarAppLib)
|
||||
add_subdirectory(src/CopyrighFixer)
|
||||
|
||||
if (COPYRIGHT_FIXER_TESTS)
|
||||
add_subdirectory(src/CFixer)
|
||||
else()
|
||||
message("The CFixer tool is disabled.")
|
||||
endif()
|
||||
|
||||
if (COPYRIGHT_FIXER_TESTS)
|
||||
add_subdirectory(tests)
|
||||
|
@ -10,9 +10,6 @@ cmake_minimum_required(VERSION 3.14)
|
||||
set(CURRENT_PROJECT "CFixer")
|
||||
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
|
||||
|
||||
file(GLOB SOURCE_CPP
|
||||
"*.cpp" "*.qrc"
|
||||
"Private/*.cpp" "Private/*.qrc"
|
||||
@ -27,9 +24,7 @@ else ()
|
||||
add_executable(${CURRENT_PROJECT} ${SOURCE_CPP})
|
||||
endif()
|
||||
|
||||
if (${QT_VERSION_MAJOR})
|
||||
target_link_libraries(${CURRENT_PROJECT} PUBLIC Qt${QT_VERSION_MAJOR}::Core)
|
||||
endif()
|
||||
target_link_libraries(${CURRENT_PROJECT} PUBLIC Qt${QT_VERSION_MAJOR}::Core)
|
||||
target_link_libraries(${CURRENT_PROJECT} PUBLIC ${PROJECT_NAME})
|
||||
|
||||
target_include_directories(${CURRENT_PROJECT} PUBLIC ${PUBLIC_INCUDE_DIR})
|
||||
|
@ -1,28 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2020-2021 QuasarApp.
|
||||
# Distributed under the lgplv3 software license, see the accompanying
|
||||
# Everyone is permitted to copy and distribute verbatim copies
|
||||
# of this license document, but changing it is not allowed.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
|
||||
include(../submodules/QuasarAppLib/CMake/ProjectOut.cmake)
|
||||
include(../submodules/QuasarAppLib/CMake/Version.cmake)
|
||||
include(../submodules/QuasarAppLib/CMake/QtUtils.cmake)
|
||||
include(../submodules/QuasarAppLib/CMake/crossplatform/crossplatform.cmake)
|
||||
|
||||
add_subdirectory(../submodules/QuasarAppLib)
|
||||
add_subdirectory(CFixer)
|
||||
add_subdirectory(CopyrighFixer)
|
||||
|
@ -9,10 +9,6 @@ cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
add_definitions(-DCopyrighFixer_LIBRARY)
|
||||
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
|
||||
|
||||
file(GLOB SOURCE_CPP
|
||||
"*.cpp" "*.qrc"
|
||||
"CopyrighFixer/*.cpp" "CopyrighFixer/*.qrc"
|
||||
|
@ -9,16 +9,8 @@ cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
set(CURRENT_PROJECT ${PROJECT_NAME}Test)
|
||||
|
||||
include(../submodules/QuasarAppLib/CMake/ProjectOut.cmake)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Test REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Test REQUIRED)
|
||||
|
||||
file(GLOB SOURCE_CPP
|
||||
"*.cpp" "*.qrc"
|
||||
|
Loading…
x
Reference in New Issue
Block a user