mirror of
https://github.com/QuasarApp/CopyrightFixer.git
synced 2025-04-27 02:04:41 +00:00
backport fixes from the cmake template
This commit is contained in:
parent
03a059f212
commit
ab1f3837e6
@ -23,10 +23,32 @@ include(CMake/QuasarAppCITargets.cmake)
|
|||||||
|
|
||||||
# Add sub directories
|
# Add sub directories
|
||||||
add_subdirectory(src)
|
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()
|
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()
|
initAll()
|
||||||
|
|
||||||
|
@ -21,7 +21,11 @@ file(GLOB SOURCE_CPP
|
|||||||
set(PUBLIC_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
set(PUBLIC_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Private")
|
set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Private")
|
||||||
|
|
||||||
|
if (ANDROID)
|
||||||
|
add_library(${CURRENT_PROJECT} ${SOURCE_CPP})
|
||||||
|
else ()
|
||||||
add_executable(${CURRENT_PROJECT} ${SOURCE_CPP})
|
add_executable(${CURRENT_PROJECT} ${SOURCE_CPP})
|
||||||
|
endif()
|
||||||
|
|
||||||
if (${QT_VERSION_MAJOR})
|
if (${QT_VERSION_MAJOR})
|
||||||
target_link_libraries(${CURRENT_PROJECT} PUBLIC Qt${QT_VERSION_MAJOR}::Core)
|
target_link_libraries(${CURRENT_PROJECT} PUBLIC Qt${QT_VERSION_MAJOR}::Core)
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
#include "CopyrighFixer_global.h"
|
#include "CopyrighFixer_global.h"
|
||||||
|
|
||||||
namespace CopyrighFixer {
|
|
||||||
|
|
||||||
inline void initCopyrighFixerResources() { Q_INIT_RESOURCE(CopyrighFixer); }
|
inline void initCopyrighFixerResources() { Q_INIT_RESOURCE(CopyrighFixer); }
|
||||||
|
|
||||||
|
namespace CopyrighFixer {
|
||||||
|
|
||||||
|
|
||||||
bool CopyrighFixer_EXPORT init();
|
bool CopyrighFixer_EXPORT init();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user