Переводит сборку на CMake
This commit is contained in:
parent
7f9bbfc9b8
commit
89d2560967
|
@ -38,6 +38,7 @@ version.h
|
||||||
|
|
||||||
# qtcreator generated files
|
# qtcreator generated files
|
||||||
*.pro.user*
|
*.pro.user*
|
||||||
|
*.txt.user*
|
||||||
*.qbs.user*
|
*.qbs.user*
|
||||||
*.qmlproject.user*
|
*.qmlproject.user*
|
||||||
*.pluginspec
|
*.pluginspec
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
project(plugin VERSION 1.0.0)
|
||||||
|
|
||||||
|
add_subdirectory(src)
|
||||||
|
add_subdirectory(doc)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
add_subdirectory(tests)
|
|
@ -0,0 +1,23 @@
|
||||||
|
if (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
||||||
|
find_package(Doxygen)
|
||||||
|
if(DOXYGEN_FOUND)
|
||||||
|
set(DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
|
||||||
|
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
|
||||||
|
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
||||||
|
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
|
||||||
|
|
||||||
|
add_custom_target( doc_doxygen ALL
|
||||||
|
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
COMMENT "Generating API documentation with Doxygen"
|
||||||
|
VERBATIM)
|
||||||
|
|
||||||
|
install(FILES "${DOXYGEN_OUTPUT_DIR}/${PROJECT_NAME}.qch"
|
||||||
|
DESTINATION ${DOCPATH})
|
||||||
|
install(DIRECTORY "${DOXYGEN_OUTPUT_DIR}/${PROJECT_NAME}"
|
||||||
|
DESTINATION ${DOCPATH})
|
||||||
|
else()
|
||||||
|
message(WARNING "Doxygen not found, unable to generate documentation")
|
||||||
|
endif()
|
||||||
|
endif()
|
|
@ -0,0 +1,34 @@
|
||||||
|
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||||
|
execute_process(
|
||||||
|
COMMAND git rev-list -1 HEAD -- .
|
||||||
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_COMMIT
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND git describe --tags --always ${GIT_COMMIT}
|
||||||
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND git show -s --format=format:\"%ci\" ${GIT_COMMIT_HASH}
|
||||||
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_DATE_OUT
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
string(REPLACE "\"" "" GIT_DATE "${GIT_DATE_OUT}")
|
||||||
|
|
||||||
|
else(EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||||
|
set(GIT_DATE "")
|
||||||
|
set(GIT_COMMIT_HASH "")
|
||||||
|
endif(EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/cmake/version.h.in
|
||||||
|
version.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
|
@ -0,0 +1,39 @@
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/main.cmake")
|
||||||
|
|
||||||
|
if ("${CMAKE_SOURCE_DIR}/src/3rdparty/${PROJECT_NAME}/src"
|
||||||
|
STREQUAL "${PROJECT_SOURCE_DIR}"
|
||||||
|
OR "${CMAKE_PROJECT_NAME}" STREQUAL "${PROJECT_NAME}")
|
||||||
|
# Пути к бинарным файлам
|
||||||
|
set(INCPATH "include")
|
||||||
|
set(RINCPATH "../include")
|
||||||
|
set(DOCPATH "share/doc/${PROJECT_NAME}")
|
||||||
|
if (UNIX)
|
||||||
|
set(RLIBRARYPATH "lib/${PROJECT_NAME}")
|
||||||
|
set(RLIBRARYTESTPATH "lib/${PROJECT_NAME}")
|
||||||
|
endif (UNIX)
|
||||||
|
if (WIN32)
|
||||||
|
set(RLIBRARYPATH "./")
|
||||||
|
set(RLIBRARYTESTPATH "./")
|
||||||
|
endif (WIN32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Места нахождения бинарных файлов
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BINARY_DIR}/${APPPATH}")
|
||||||
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${BINARY_DIR}/${RLIBRARYPATH}")
|
||||||
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${BINARY_DIR}/${RLIBRARYPATH}")
|
||||||
|
|
||||||
|
# Сборка проекта
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/rpath.cmake")
|
||||||
|
add_library(${PROJECT_NAME} SHARED ${HEADERS} ${SOURCES} ${FORMS} ${RESOURCES})
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PUBLIC ${PROJECT_SOURCE_DIR}/${RINCPATH}
|
||||||
|
)
|
||||||
|
target_link_libraries(${PROJECT_NAME} ${LIBRARIES})
|
||||||
|
|
||||||
|
# Установка проекта
|
||||||
|
install (TARGETS ${PROJECT_NAME} DESTINATION ${RLIBRARYPATH})
|
||||||
|
file(GLOB PUBHEADERS "${RINCPATH}/${PROJECT_NAME}/*.h")
|
||||||
|
foreach(PUBFILENAME ${PUBHEADERS})
|
||||||
|
string(REPLACE "${RINCPATH}/${PROJECT_NAME}/" "" FILENAME ${PUBFILENAME})
|
||||||
|
install(FILES ${FILENAME} DESTINATION "${INCPATH}/${PROJECT_NAME}")
|
||||||
|
endforeach()
|
|
@ -0,0 +1,35 @@
|
||||||
|
# Переменные описания проектов
|
||||||
|
add_definitions(-DAPP_NAME="""${PROJECT_NAME}"""
|
||||||
|
-DAPP_PRODUCT="""${PRODUCTNAME}"""
|
||||||
|
-DAPP_VERSION="""${PROJECT_VERSION}"""
|
||||||
|
-DAPP_DESCRIPTION="""${DESCRIPTION}"""
|
||||||
|
-DAPP_COMPANY="""${COMPANY}"""
|
||||||
|
-DAPP_COPYRIGHT="""${COPYRIGHT}""")
|
||||||
|
|
||||||
|
# Файлы для сборки
|
||||||
|
file(GLOB HEADERS "*.h")
|
||||||
|
file(GLOB SOURCES "*.cpp")
|
||||||
|
file(GLOB FORMS "*.ui")
|
||||||
|
file(GLOB RESOURCES "*.qrc")
|
||||||
|
|
||||||
|
# Пути к бинарным файлам
|
||||||
|
set(BINARY_DIR "${CMAKE_BINARY_DIR}")
|
||||||
|
set(APPPATH "bin")
|
||||||
|
set(INCPATH "include/${CMAKE_PROJECT_NAME}")
|
||||||
|
set(RINCPATH "include")
|
||||||
|
set(DOCPATH "share/doc/${CMAKE_PROJECT_NAME}")
|
||||||
|
set(TESTPATH "bin")
|
||||||
|
set(RPLUGINPATH "lib/${CMAKE_PROJECT_NAME}/plugins")
|
||||||
|
add_definitions(-DPLUGIN_DIR="""../${RPLUGINPATH}""")
|
||||||
|
|
||||||
|
if (UNIX)
|
||||||
|
set(RLIBRARYPATH "lib/${CMAKE_PROJECT_NAME}")
|
||||||
|
set(RLIBRARYTESTPATH "lib/${CMAKE_PROJECT_NAME}")
|
||||||
|
endif (UNIX)
|
||||||
|
if (WIN32)
|
||||||
|
set(RLIBRARYPATH "./")
|
||||||
|
set(RLIBRARYTESTPATH "./")
|
||||||
|
endif (WIN32)
|
||||||
|
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/qt.cmake")
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/git.cmake")
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Поддержка Qt Framework
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
set(CMAKE_AUTORCC_OPTIONS -no-compress)
|
||||||
|
find_package(Qt5Core)
|
||||||
|
set(ignoreMe "${QT_QMAKE_EXECUTABLE}")
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Использование RPATH при установке в не системную директорию
|
||||||
|
#get_target_property(LIBS ${PROJECT_NAME} LINK_LIBRARIES)
|
||||||
|
foreach(LIB ${LIBRARIES})
|
||||||
|
get_property(LIBTYPE TARGET ${LIB} PROPERTY TYPE)
|
||||||
|
if (${LIBTYPE} STREQUAL "SHARED_LIBRARY")
|
||||||
|
get_property(LIBDIR TARGET ${LIB} PROPERTY LIBRARY_OUTPUT_DIRECTORY)
|
||||||
|
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIBDIR}" isSystemDir)
|
||||||
|
if("${isSystemDir}" STREQUAL "-1")
|
||||||
|
file(RELATIVE_PATH RELPATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${LIBDIR})
|
||||||
|
list(FIND RPATHLIST ${RELPATH} EXISTRPATH)
|
||||||
|
if("${EXISTRPATH}" STREQUAL "-1")
|
||||||
|
list(APPEND RPATHLIST ${RELPATH})
|
||||||
|
if("${CMAKE_INSTALL_RPATH}" STREQUAL "")
|
||||||
|
set(CMAKE_INSTALL_RPATH "$ORIGIN/${RELPATH}")
|
||||||
|
else()
|
||||||
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:$ORIGIN/${RELPATH}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef VERSION_H
|
||||||
|
#define VERSION_H
|
||||||
|
|
||||||
|
#define VER_REV "@GIT_DATE@ (@GIT_COMMIT_HASH@)"
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,3 @@
|
||||||
|
project(subprojects)
|
||||||
|
|
||||||
|
add_subdirectory(api)
|
|
@ -0,0 +1,4 @@
|
||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
project(plugin-api VERSION 1.0.0)
|
||||||
|
|
||||||
|
include(../doc.cmake)
|
|
@ -58,7 +58,7 @@ PROJECT_LOGO =
|
||||||
# entered, it will be relative to the location where doxygen was started. If
|
# entered, it will be relative to the location where doxygen was started. If
|
||||||
# left blank the current directory will be used.
|
# left blank the current directory will be used.
|
||||||
|
|
||||||
OUTPUT_DIRECTORY = ./
|
OUTPUT_DIRECTORY = @DOXYGEN_OUTPUT_DIR@
|
||||||
|
|
||||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
||||||
# directories (in 2 levels) under the output directory of each output format and
|
# directories (in 2 levels) under the output directory of each output format and
|
||||||
|
@ -1112,7 +1112,7 @@ GENERATE_HTML = YES
|
||||||
# The default directory is: html.
|
# The default directory is: html.
|
||||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||||
|
|
||||||
HTML_OUTPUT = html
|
HTML_OUTPUT = @PROJECT_NAME@/
|
||||||
|
|
||||||
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
|
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
|
||||||
# generated HTML page (for example: .htm, .php, .asp).
|
# generated HTML page (for example: .htm, .php, .asp).
|
||||||
|
@ -1365,13 +1365,15 @@ GENERATE_QHP = YES
|
||||||
# the HTML output folder.
|
# the HTML output folder.
|
||||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||||
|
|
||||||
|
QCH_FILE = ../@PROJECT_NAME@.qch
|
||||||
|
|
||||||
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
|
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
|
||||||
# Project output. For more information please see Qt Help Project / Namespace
|
# Project output. For more information please see Qt Help Project / Namespace
|
||||||
# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
|
# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
|
||||||
# The default value is: org.doxygen.Project.
|
# The default value is: org.doxygen.Project.
|
||||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||||
|
|
||||||
QHP_NAMESPACE = com.rtptechgroup.extension.001
|
QHP_NAMESPACE = com.company.project.001
|
||||||
|
|
||||||
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
|
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
|
||||||
# Help Project output. For more information please see Qt Help Project / Virtual
|
# Help Project output. For more information please see Qt Help Project / Virtual
|
||||||
|
@ -1380,7 +1382,7 @@ QHP_NAMESPACE = com.rtptechgroup.extension.001
|
||||||
# The default value is: doc.
|
# The default value is: doc.
|
||||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||||
|
|
||||||
QHP_VIRTUAL_FOLDER = plugin
|
QHP_VIRTUAL_FOLDER = project
|
||||||
|
|
||||||
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
|
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
|
||||||
# filter to add. For more information please see Qt Help Project / Custom
|
# filter to add. For more information please see Qt Help Project / Custom
|
|
@ -1,13 +0,0 @@
|
||||||
import "../main.qbs" as DocProduct
|
|
||||||
|
|
||||||
DocProduct {
|
|
||||||
name: "plugin-api"
|
|
||||||
type: "docs"
|
|
||||||
|
|
||||||
docName: "plugin-dev"
|
|
||||||
Group {
|
|
||||||
fileTagsFilter: ["docs"]
|
|
||||||
qbs.install: true
|
|
||||||
qbs.installDir: product.docPath
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/main.cmake")
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/doxygen.cmake")
|
|
@ -1,5 +0,0 @@
|
||||||
Project {
|
|
||||||
references: [
|
|
||||||
"api/api.qbs"
|
|
||||||
]
|
|
||||||
}
|
|
62
doc/main.qbs
62
doc/main.qbs
|
@ -1,62 +0,0 @@
|
||||||
import "../main.qbs" as MainProduct
|
|
||||||
|
|
||||||
import qbs;
|
|
||||||
import qbs.Process;
|
|
||||||
import qbs.TextFile;
|
|
||||||
|
|
||||||
MainProduct {
|
|
||||||
builtByDefault: false
|
|
||||||
|
|
||||||
FileTagger {
|
|
||||||
fileTags: ["docs"]
|
|
||||||
patterns: ["*.qch"]
|
|
||||||
}
|
|
||||||
|
|
||||||
Group {
|
|
||||||
name: "markdown"
|
|
||||||
files: ["pages/*.markdown"]
|
|
||||||
fileTags: ["markdown"]
|
|
||||||
}
|
|
||||||
|
|
||||||
Group {
|
|
||||||
name: "doxygen"
|
|
||||||
files: [product.sourceDirectory + "/Doxyfile"]
|
|
||||||
fileTags: ["doxyconf"]
|
|
||||||
}
|
|
||||||
|
|
||||||
property string docName: "doc"
|
|
||||||
Rule {
|
|
||||||
multiplex: true
|
|
||||||
inputs: ["doxyconf"]
|
|
||||||
outputFileTags: ["docs"]
|
|
||||||
outputArtifacts: [{filePath: product.docName + ".qch", fileTags: ["docs"]},
|
|
||||||
{filePath: product.docName + "/", fileTags: ["docs"]}]
|
|
||||||
prepare: {
|
|
||||||
var cmd = new JavaScriptCommand ();
|
|
||||||
cmd.description = "generating api documentation";
|
|
||||||
cmd.highlight = "doxygen";
|
|
||||||
cmd.sourceCode = function () {
|
|
||||||
for (var idx = 0; idx < inputs["doxyconf"].length; idx++) {
|
|
||||||
var file = inputs["doxyconf"][idx].filePath;
|
|
||||||
|
|
||||||
var doxFile = new TextFile(file);
|
|
||||||
var content = doxFile.readAll();
|
|
||||||
doxFile.close();
|
|
||||||
|
|
||||||
var proc = new Process ();
|
|
||||||
proc.setWorkingDirectory (product.sourceDirectory);
|
|
||||||
proc.start ("doxygen",["-"]);
|
|
||||||
proc.write(content);
|
|
||||||
proc.writeLine("HTML_OUTPUT = " + product.docName + "/");
|
|
||||||
proc.writeLine("QCH_FILE = ../" + product.docName + ".qch");
|
|
||||||
proc.writeLine("OUTPUT_DIRECTORY = " + product.buildDirectory);
|
|
||||||
proc.closeWriteChannel();
|
|
||||||
if (!proc.waitForFinished())
|
|
||||||
proc.kill();
|
|
||||||
proc.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return cmd;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
74
main.qbs
74
main.qbs
|
@ -1,74 +0,0 @@
|
||||||
import qbs
|
|
||||||
import qbs.File
|
|
||||||
import qbs.FileInfo
|
|
||||||
import qbs.Process
|
|
||||||
|
|
||||||
Product {
|
|
||||||
type: "dynamiclibrary"
|
|
||||||
|
|
||||||
property string productname: ""
|
|
||||||
property string version: "1"
|
|
||||||
property string description: ""
|
|
||||||
property string company: ""
|
|
||||||
property string copyright: ""
|
|
||||||
|
|
||||||
property string applicationPath: "bin/"
|
|
||||||
property string includePath: "include/plugin/"
|
|
||||||
property string docPath: "share/doc/plugin/"
|
|
||||||
|
|
||||||
Properties {
|
|
||||||
condition: qbs.targetOS.contains("linux")
|
|
||||||
property string rLibraryPath: "../lib/" + name + "/"
|
|
||||||
property string rLibraryTestPath: "../../../lib/" + name + "/"
|
|
||||||
}
|
|
||||||
Properties {
|
|
||||||
condition: qbs.targetOS.contains("windows")
|
|
||||||
property string rLibraryPath: ""
|
|
||||||
property string rLibraryTestPath: ""
|
|
||||||
}
|
|
||||||
|
|
||||||
property string pubIncludePath: sourceDirectory + "/../include"
|
|
||||||
|
|
||||||
|
|
||||||
cpp.defines: [
|
|
||||||
"APP_VERSION=" + "\"" + product.version + "\"",
|
|
||||||
"APP_COMPANY=" + "\"" + product.company + "\"",
|
|
||||||
"APP_PRODUCT=" + "\"" + product.productname + "\"",
|
|
||||||
"APP_DESCRIPTION=" + "\"" + product.description + "\"",
|
|
||||||
"APP_COPYRIGHT=" + "\"" + product.copyright + "\"",
|
|
||||||
"APP_NAME=" + "\"" + product.name + "\""
|
|
||||||
]
|
|
||||||
Depends { name: "cpp" }
|
|
||||||
|
|
||||||
Probe {
|
|
||||||
id: version
|
|
||||||
property stringList targetOS: qbs.targetOS
|
|
||||||
property string prjDir: project.sourceDirectory
|
|
||||||
property string prdDir: product.sourceDirectory
|
|
||||||
property int hack: {
|
|
||||||
//A bit of a hack to make qbs re-resolve (see QBS-996)
|
|
||||||
return File.lastModified(prjDir + "/.git/logs/HEAD");
|
|
||||||
}
|
|
||||||
configure: {
|
|
||||||
var cmd;
|
|
||||||
var args;
|
|
||||||
if (targetOS.contains("windows")) {
|
|
||||||
cmd = "cmd";
|
|
||||||
args = ["/c", prjDir+"/scripts/version.bat"];
|
|
||||||
}
|
|
||||||
if (targetOS.contains("linux")) {
|
|
||||||
cmd = "/usr/bin/sh";
|
|
||||||
args = ["-c", prjDir+"/scripts/version.sh"];
|
|
||||||
}
|
|
||||||
|
|
||||||
var p = new Process();
|
|
||||||
p.setWorkingDirectory(prdDir)
|
|
||||||
if (0 === p.exec(cmd, args)) {
|
|
||||||
found = true;
|
|
||||||
} else {
|
|
||||||
found = false;
|
|
||||||
}
|
|
||||||
p.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
Project {
|
|
||||||
references: [
|
|
||||||
"src/plugin.qbs",
|
|
||||||
"doc/doc.qbs",
|
|
||||||
"tests/tests.qbs"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
@echo off
|
|
||||||
|
|
||||||
for /f "tokens=*" %%m in ('git rev-list -1 HEAD -- .') do (
|
|
||||||
set commit=%%m
|
|
||||||
)
|
|
||||||
for /f "tokens=*" %%i in ('git describe --tags --always %commit%') do (
|
|
||||||
set ver=%%i
|
|
||||||
)
|
|
||||||
set test=-
|
|
||||||
if exist src\version.h (
|
|
||||||
for /F "TOKENS=2,3*" %%j in (version.h) do (
|
|
||||||
set test=%%j
|
|
||||||
)
|
|
||||||
)
|
|
||||||
for /f "tokens=*" %%k in ('git show -s --format^=format:%%ci %ver%') do (
|
|
||||||
set datever=%%k
|
|
||||||
)
|
|
||||||
|
|
||||||
if not %test%=="%ver%" (
|
|
||||||
echo #ifndef VERSION_H > src\version.h
|
|
||||||
echo #define VERSION_H >> src\version.h
|
|
||||||
echo #define VER_REV "%datever% (%ver%)" >> src\version.h
|
|
||||||
echo #endif >> src\version.h
|
|
||||||
)
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
TVER=`cat src/version.h | grep '#define VER_REV'`
|
|
||||||
COMMIT=`git rev-list -1 HEAD -- .`
|
|
||||||
VER=`git describe --tags --always $COMMIT`
|
|
||||||
|
|
||||||
if [ "$TVER" != "#define VER_REV \"$VER\"" ]; then
|
|
||||||
DATE_REV=`git show -s --format=format:"%ci" $VER`
|
|
||||||
echo "#ifndef VERSION_H" > src/version.h
|
|
||||||
echo "#define VERSION_H" >> src/version.h
|
|
||||||
echo "#define VER_REV \"$DATE_REV ($VER)\"" >> src/version.h
|
|
||||||
echo "#endif" >> src/version.h
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
project(plugin VERSION 1.0.0)
|
||||||
|
|
||||||
|
set(PRODUCTNAME "Plugin Library")
|
||||||
|
set(DESCRIPTION "Plugin Library")
|
||||||
|
set(COMPANY "RTPTechGroup")
|
||||||
|
set(COPYRIGHT "Copyright (C) RTPTechGroup")
|
||||||
|
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/libs.cmake")
|
||||||
|
|
||||||
|
target_compile_definitions(${PROJECT_NAME} PRIVATE -DPLUGIN_LIBRARY)
|
||||||
|
|
||||||
|
find_package(Qt5Core)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Core)
|
||||||
|
|
||||||
|
find_package(Qt5Widgets)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
|
59
src/main.qbs
59
src/main.qbs
|
@ -1,59 +0,0 @@
|
||||||
import qbs.File
|
|
||||||
import qbs.FileInfo
|
|
||||||
|
|
||||||
import "../main.qbs" as SrcProduct
|
|
||||||
SrcProduct {
|
|
||||||
name: "libs"
|
|
||||||
type: "dynamiclibrary"
|
|
||||||
|
|
||||||
Export {
|
|
||||||
Depends { name: "cpp" }
|
|
||||||
cpp.includePaths: product.pubIncludePath
|
|
||||||
cpp.rpaths: [product.rLibraryPath, product.rLibraryTestPath]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Group {
|
|
||||||
overrideTags: false
|
|
||||||
fileTagsFilter: [
|
|
||||||
"dynamiclibrary",
|
|
||||||
"dynamiclibrary_symlink",
|
|
||||||
"dynamiclibrary_import"
|
|
||||||
]
|
|
||||||
qbs.install: true
|
|
||||||
qbs.installDir: product.applicationPath + "/" + product.rLibraryPath
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FileTagger {
|
|
||||||
condition: publicInclude.value.length > 0
|
|
||||||
patterns: publicInclude.value
|
|
||||||
fileTags: ["publicInclude"]
|
|
||||||
}
|
|
||||||
|
|
||||||
Group {
|
|
||||||
fileTagsFilter: ["publicInclude"]
|
|
||||||
qbs.install: true
|
|
||||||
qbs.installDir: product.includePath
|
|
||||||
}
|
|
||||||
|
|
||||||
Probe {
|
|
||||||
id: publicInclude
|
|
||||||
property stringList value
|
|
||||||
property string prjDir: project.sourceDirectory
|
|
||||||
property string incDir: product.pubIncludePath + "/" + product.name
|
|
||||||
|
|
||||||
property int hack: {
|
|
||||||
//A bit of a hack to make qbs re-resolve (see QBS-996)
|
|
||||||
return File.lastModified(prjDir + "/.git/logs/HEAD");
|
|
||||||
}
|
|
||||||
|
|
||||||
configure: {
|
|
||||||
var list = File.directoryEntries(incDir, File.Files);
|
|
||||||
for(var dir in list) {
|
|
||||||
list[dir] = FileInfo.fileName(list[dir]);
|
|
||||||
}
|
|
||||||
value = list;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
import "./main.qbs" as LibProduct
|
|
||||||
|
|
||||||
LibProduct {
|
|
||||||
name: "plugin"
|
|
||||||
|
|
||||||
productname: "Plugin Library"
|
|
||||||
version: "1.0.0"
|
|
||||||
description: "Plugin Library"
|
|
||||||
company: "RTPTechGroup"
|
|
||||||
copyright: "Copyright (C) RTPTechGroup"
|
|
||||||
|
|
||||||
cpp.defines: base.concat([
|
|
||||||
"PLUGIN_LIBRARY"
|
|
||||||
])
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets"] }
|
|
||||||
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
"*.ui",
|
|
||||||
"*.qrc"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
project(subprojects)
|
||||||
|
|
||||||
|
add_subdirectory(auto)
|
||||||
|
add_subdirectory(benchmarks)
|
||||||
|
add_subdirectory(manual)
|
|
@ -0,0 +1,8 @@
|
||||||
|
project(subprojects)
|
||||||
|
|
||||||
|
add_subdirectory(tst_plugin1)
|
||||||
|
add_subdirectory(tst_plugin2)
|
||||||
|
add_subdirectory(tst_plugin3)
|
||||||
|
add_subdirectory(tst_plugin4)
|
||||||
|
|
||||||
|
add_subdirectory(tst_pluginmanager)
|
|
@ -0,0 +1,12 @@
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/main.cmake")
|
||||||
|
|
||||||
|
# Места нахождения бинарных файлов
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BINARY_DIR}/${TESTPATH}")
|
||||||
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${BINARY_DIR}/${TESTPATH}")
|
||||||
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${BINARY_DIR}/${TESTPATH}")
|
||||||
|
|
||||||
|
# Сборка проекта
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/rpath.cmake")
|
||||||
|
add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES} ${FORMS} ${RESOURCES})
|
||||||
|
add_test(${PROJECT_NAME} "${BINARY_DIR}/${TESTPATH}/${PROJECT_NAME}")
|
||||||
|
target_link_libraries(${PROJECT_NAME} ${LIBRARIES})
|
|
@ -1,9 +0,0 @@
|
||||||
Project {
|
|
||||||
references: [
|
|
||||||
"tst_plugin1/tst_plugin1.qbs",
|
|
||||||
"tst_plugin2/tst_plugin2.qbs",
|
|
||||||
"tst_plugin3/tst_plugin3.qbs",
|
|
||||||
"tst_plugin4/tst_plugin4.qbs",
|
|
||||||
"tst_pluginmanager/tst_pluginmanager.qbs"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
import "../main.qbs" as TestProduct
|
|
||||||
TestProduct {
|
|
||||||
name: "auto"
|
|
||||||
type: "application"
|
|
||||||
Group {
|
|
||||||
fileTagsFilter: ["application"]
|
|
||||||
qbs.install: true
|
|
||||||
qbs.installDir: "tests/auto/plugin/"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/main.cmake")
|
||||||
|
|
||||||
|
# Места нахождения бинарных файлов
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BINARY_DIR}/${TESTPATH}/plugins")
|
||||||
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${BINARY_DIR}/${TESTPATH}/plugins")
|
||||||
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${BINARY_DIR}/${TESTPATH}/plugins")
|
||||||
|
|
||||||
|
# Сборка проекта
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/rpath.cmake")
|
||||||
|
add_library(${PROJECT_NAME} MODULE ${HEADERS} ${SOURCES} ${FORMS} ${RESOURCES})
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PUBLIC ${PROJECT_SOURCE_DIR}/include
|
||||||
|
)
|
||||||
|
target_link_libraries(${PROJECT_NAME} ${LIBRARIES})
|
|
@ -0,0 +1,18 @@
|
||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
project(tst_plugin1 VERSION 1.0.0)
|
||||||
|
|
||||||
|
set(PRODUCTNAME "TST_PLUGIN1")
|
||||||
|
set(DESCRIPTION "TST_PLUGIN1")
|
||||||
|
set(COMPANY "RTPTechGroup")
|
||||||
|
set(COPYRIGHT "Copyright (C) RTPTechGroup")
|
||||||
|
set(LIBRARIES
|
||||||
|
plugin
|
||||||
|
)
|
||||||
|
|
||||||
|
include(../plugins.cmake)
|
||||||
|
|
||||||
|
find_package(Qt5Core)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Core)
|
||||||
|
|
||||||
|
find_package(Qt5Widgets)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
|
|
@ -1,30 +0,0 @@
|
||||||
import "../main.qbs" as PluginProduct
|
|
||||||
|
|
||||||
PluginProduct {
|
|
||||||
name: "tst_plugin1"
|
|
||||||
type: "dynamiclibrary"
|
|
||||||
|
|
||||||
productname: "TST_PLUGIN1"
|
|
||||||
version: "1.0.0"
|
|
||||||
description: "TST_PLUGIN1"
|
|
||||||
company: "RTPTechGroup"
|
|
||||||
copyright: "Copyright (C) RTPTechGroup"
|
|
||||||
|
|
||||||
cpp.defines: base.concat(["TST_PLUGIN1_LIBRARY"])
|
|
||||||
cpp.includePaths: base.concat(['.'])
|
|
||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets"] }
|
|
||||||
Depends { name: "plugin" }
|
|
||||||
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
"*.ui",
|
|
||||||
"*.qrc"
|
|
||||||
]
|
|
||||||
Group {
|
|
||||||
fileTagsFilter: ["dynamiclibrary"]
|
|
||||||
qbs.install: true
|
|
||||||
qbs.installDir: "tests/auto/plugin/plugins"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
project(tst_plugin2 VERSION 1.0.0)
|
||||||
|
|
||||||
|
set(PRODUCTNAME "TST_PLUGIN2")
|
||||||
|
set(DESCRIPTION "TST_PLUGIN2")
|
||||||
|
set(COMPANY "RTPTechGroup")
|
||||||
|
set(COPYRIGHT "Copyright (C) RTPTechGroup")
|
||||||
|
set(LIBRARIES
|
||||||
|
plugin
|
||||||
|
)
|
||||||
|
include(../plugins.cmake)
|
||||||
|
|
||||||
|
find_package(Qt5Core)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Core)
|
||||||
|
|
||||||
|
find_package(Qt5Widgets)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
|
|
@ -1,32 +0,0 @@
|
||||||
import "../main.qbs" as PluginProduct
|
|
||||||
|
|
||||||
PluginProduct {
|
|
||||||
name: "tst_plugin2"
|
|
||||||
type: "dynamiclibrary"
|
|
||||||
|
|
||||||
productname: "TST_PLUGIN2"
|
|
||||||
version: "1.0.0"
|
|
||||||
description: "TST_PLUGIN2"
|
|
||||||
company: "RTPTechGroup"
|
|
||||||
copyright: "Copyright (C) RTPTechGroup"
|
|
||||||
|
|
||||||
cpp.defines: base.concat(["TST_PLUGIN2_LIBRARY"])
|
|
||||||
cpp.includePaths: base.concat(['.'])
|
|
||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets"] }
|
|
||||||
Depends { name: "plugin" }
|
|
||||||
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
"*.ui",
|
|
||||||
"*.qrc"
|
|
||||||
]
|
|
||||||
Group {
|
|
||||||
fileTagsFilter: [
|
|
||||||
"dynamiclibrary",
|
|
||||||
"dynamiclibrary_import"]
|
|
||||||
qbs.install: true
|
|
||||||
qbs.installDir: "tests/auto/plugin/plugins"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
project(tst_plugin3 VERSION 1.0.0)
|
||||||
|
|
||||||
|
set(PRODUCTNAME "TST_PLUGIN3")
|
||||||
|
set(DESCRIPTION "TST_PLUGIN3")
|
||||||
|
set(COMPANY "RTPTechGroup")
|
||||||
|
set(COPYRIGHT "Copyright (C) RTPTechGroup")
|
||||||
|
set(LIBRARIES
|
||||||
|
plugin
|
||||||
|
)
|
||||||
|
include(../plugins.cmake)
|
||||||
|
|
||||||
|
find_package(Qt5Core)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Core)
|
||||||
|
|
||||||
|
find_package(Qt5Widgets)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
|
|
@ -1,32 +0,0 @@
|
||||||
import "../main.qbs" as PluginProduct
|
|
||||||
|
|
||||||
PluginProduct {
|
|
||||||
name: "tst_plugin3"
|
|
||||||
type: "dynamiclibrary"
|
|
||||||
|
|
||||||
productname: "TST_PLUGIN3"
|
|
||||||
version: "1.0.0"
|
|
||||||
description: "TST_PLUGIN3"
|
|
||||||
company: "RTPTechGroup"
|
|
||||||
copyright: "Copyright (C) RTPTechGroup"
|
|
||||||
|
|
||||||
cpp.defines: base.concat(["TST_PLUGIN3_LIBRARY"])
|
|
||||||
cpp.includePaths: base.concat(['.'])
|
|
||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets"] }
|
|
||||||
Depends { name: "plugin" }
|
|
||||||
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
"*.ui",
|
|
||||||
"*.qrc"
|
|
||||||
]
|
|
||||||
Group {
|
|
||||||
fileTagsFilter: [
|
|
||||||
"dynamiclibrary",
|
|
||||||
"dynamiclibrary_import"]
|
|
||||||
qbs.install: true
|
|
||||||
qbs.installDir: "tests/auto/plugin/plugins"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
project(tst_plugin4 VERSION 1.0.0)
|
||||||
|
|
||||||
|
set(PRODUCTNAME "TST_PLUGIN4")
|
||||||
|
set(DESCRIPTION "TST_PLUGIN4")
|
||||||
|
set(COMPANY "RTPTechGroup")
|
||||||
|
set(COPYRIGHT "Copyright (C) RTPTechGroup")
|
||||||
|
set(LIBRARIES
|
||||||
|
plugin
|
||||||
|
)
|
||||||
|
include(../plugins.cmake)
|
||||||
|
|
||||||
|
find_package(Qt5Core)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Core)
|
||||||
|
|
||||||
|
find_package(Qt5Widgets)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
|
|
@ -1,32 +0,0 @@
|
||||||
import "../main.qbs" as PluginProduct
|
|
||||||
|
|
||||||
PluginProduct {
|
|
||||||
name: "tst_plugin4"
|
|
||||||
type: "dynamiclibrary"
|
|
||||||
|
|
||||||
productname: "TST_PLUGIN4"
|
|
||||||
version: "1.0.0"
|
|
||||||
description: "TST_PLUGIN4"
|
|
||||||
company: "RTPTechGroup"
|
|
||||||
copyright: "Copyright (C) RTPTechGroup"
|
|
||||||
|
|
||||||
cpp.defines: base.concat(["TST_PLUGIN4_LIBRARY"])
|
|
||||||
cpp.includePaths: base.concat(['.'])
|
|
||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets"] }
|
|
||||||
Depends { name: "plugin" }
|
|
||||||
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
"*.ui",
|
|
||||||
"*.qrc"
|
|
||||||
]
|
|
||||||
Group {
|
|
||||||
fileTagsFilter: [
|
|
||||||
"dynamiclibrary",
|
|
||||||
"dynamiclibrary_import"]
|
|
||||||
qbs.install: true
|
|
||||||
qbs.installDir: "tests/auto/plugin/plugins"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
project(tst_pluginmanager VERSION 1.0.0)
|
||||||
|
|
||||||
|
set(PRODUCTNAME "TST_PLUGINMANAGER")
|
||||||
|
set(DESCRIPTION "TST_PLUGINMANAGER")
|
||||||
|
set(COMPANY "RTPTechGroup")
|
||||||
|
set(COPYRIGHT "Copyright (C) RTPTechGroup")
|
||||||
|
set(LIBRARIES
|
||||||
|
plugin
|
||||||
|
)
|
||||||
|
include(../auto.cmake)
|
||||||
|
|
||||||
|
find_package(Qt5Core)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Core)
|
||||||
|
|
||||||
|
find_package(Qt5Widgets)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
|
||||||
|
|
||||||
|
find_package(Qt5Test)
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt5::Test)
|
|
@ -1,23 +0,0 @@
|
||||||
import "../main.qbs" as PluginProduct
|
|
||||||
|
|
||||||
PluginProduct {
|
|
||||||
name: "tst_pluginmanager"
|
|
||||||
|
|
||||||
productname: ""
|
|
||||||
version: "1.0.0"
|
|
||||||
description: ""
|
|
||||||
company: "RTPTechGroup"
|
|
||||||
copyright: "Copyright (C) RTPTechGroup"
|
|
||||||
|
|
||||||
cpp.includePaths: base.concat(['.'])
|
|
||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets", "testlib"] }
|
|
||||||
Depends { name: "plugin" }
|
|
||||||
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
"*.ui",
|
|
||||||
"*.qrc"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
project(subprojects)
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/main.cmake")
|
||||||
|
|
||||||
|
# Места нахождения бинарных файлов
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BINARY_DIR}/${TESTPATH}")
|
||||||
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${BINARY_DIR}/${TESTPATH}")
|
||||||
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${BINARY_DIR}/${TESTPATH}")
|
||||||
|
|
||||||
|
# Сборка проекта
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/rpath.cmake")
|
||||||
|
add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES} ${FORMS} ${RESOURCES})
|
||||||
|
add_test(${PROJECT_NAME} "${BINARY_DIR}/${TESTPATH}/${PROJECT_NAME}")
|
||||||
|
target_link_libraries(${PROJECT_NAME} ${LIBRARIES})
|
|
@ -1,3 +0,0 @@
|
||||||
Project {
|
|
||||||
references: []
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
import "../main.qbs" as TestProduct
|
|
||||||
TestProduct {
|
|
||||||
name: "manual"
|
|
||||||
type: "application"
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
import qbs.FileInfo
|
|
||||||
import "../main.qbs" as MainProduct
|
|
||||||
MainProduct {
|
|
||||||
name: "tests"
|
|
||||||
builtByDefault: false
|
|
||||||
}
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
project(subprojects)
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
import "../main.qbs" as TestProduct
|
|
||||||
TestProduct {
|
|
||||||
name: "manual"
|
|
||||||
type: "application"
|
|
||||||
Group {
|
|
||||||
fileTagsFilter: ["application"]
|
|
||||||
qbs.install: true
|
|
||||||
qbs.installDir: "tests/manual/plugin/"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/main.cmake")
|
||||||
|
|
||||||
|
# Места нахождения бинарных файлов
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BINARY_DIR}/${TESTPATH}")
|
||||||
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${BINARY_DIR}/${TESTPATH}")
|
||||||
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${BINARY_DIR}/${TESTPATH}")
|
||||||
|
|
||||||
|
# Сборка проекта
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/rpath.cmake")
|
||||||
|
add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES} ${FORMS} ${RESOURCES})
|
||||||
|
target_link_libraries(${PROJECT_NAME} ${LIBRARIES})
|
|
@ -1,4 +0,0 @@
|
||||||
Project {
|
|
||||||
references: [
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
Project {
|
|
||||||
references: [
|
|
||||||
"auto/auto.qbs",
|
|
||||||
"benchmarks/benchmarks.qbs",
|
|
||||||
"manual/manual.qbs"
|
|
||||||
]
|
|
||||||
}
|
|
Reference in New Issue