mirror of
https://github.com/QuasarApp/CopyrightFixer.git
synced 2025-04-26 09:44:40 +00:00
backport fixes from the cmake template
This commit is contained in:
parent
03a059f212
commit
ab1f3837e6
@ -23,11 +23,33 @@ include(CMake/QuasarAppCITargets.cmake)
|
||||
|
||||
# Add sub directories
|
||||
add_subdirectory(src)
|
||||
if (${QT_VERSION_MAJOR})
|
||||
add_subdirectory(tests)
|
||||
|
||||
|
||||
if (NOT DEFINED COPYRIGHT_FIXER_TESTS)
|
||||
set(COPYRIGHT_FIXER_TESTS ON)
|
||||
|
||||
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
|
||||
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
|
||||
set(COPYRIGHT_FIXER_TESTS OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ANDROID)
|
||||
set(COPYRIGHT_FIXER_TESTS OFF)
|
||||
endif()
|
||||
|
||||
if (NOT QT_VERSION_MAJOR)
|
||||
set(COPYRIGHT_FIXER_TESTS OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if (COPYRIGHT_FIXER_TESTS)
|
||||
add_subdirectory(tests)
|
||||
else()
|
||||
message("The ${PROJECT_NAME} tests is disabled.")
|
||||
endif()
|
||||
|
||||
initAll()
|
||||
|
||||
addDoc(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)
|
||||
|
@ -21,7 +21,11 @@ file(GLOB SOURCE_CPP
|
||||
set(PUBLIC_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Private")
|
||||
|
||||
add_executable(${CURRENT_PROJECT} ${SOURCE_CPP})
|
||||
if (ANDROID)
|
||||
add_library(${CURRENT_PROJECT} ${SOURCE_CPP})
|
||||
else ()
|
||||
add_executable(${CURRENT_PROJECT} ${SOURCE_CPP})
|
||||
endif()
|
||||
|
||||
if (${QT_VERSION_MAJOR})
|
||||
target_link_libraries(${CURRENT_PROJECT} PUBLIC Qt${QT_VERSION_MAJOR}::Core)
|
||||
|
@ -7,10 +7,10 @@
|
||||
|
||||
#include "CopyrighFixer_global.h"
|
||||
|
||||
namespace CopyrighFixer {
|
||||
|
||||
inline void initCopyrighFixerResources() { Q_INIT_RESOURCE(CopyrighFixer); }
|
||||
|
||||
namespace CopyrighFixer {
|
||||
|
||||
|
||||
bool CopyrighFixer_EXPORT init();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user