-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
69 lines (55 loc) · 2.89 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
##########################################################################
# #
# Copyright 2024 by Tidop Research Group <[email protected]> #
# #
# This file is part of TidopWidgets #
# #
# TidopWidgets is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or (at #
# your option) any later version. #
# #
# TidopWidgets is distributed in the hope that it will be useful, but #
# WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. #
# See the GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with TidopWidgets. If not, see <http://www.gnu.org/licenses/>. #
# #
# https://spdx.org/licenses/GPL-3.0-or-later.html #
# #
##########################################################################
cmake_minimum_required(VERSION 3.14)
project(TidopWidgets
VERSION 0.0.1
DESCRIPTION "Tidop Widgets"
HOMEPAGE_URL "http://tidop.usal.es"
LANGUAGES CXX)
message(STATUS "\n${PROJECT_NAME} ${TidopWidgets_VERSION}")
message(STATUS ${TidopWidgets_DESCRIPTION})
message(STATUS ${TidopWidgets_HOMEPAGE_URL})
# Configuration
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_DEBUG_POSTFIX d)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
set(CMAKE_CONFIGURATION_TYPES Release;Debug)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed
set(CMAKE_AUTOMOC ON)
# Create code from a list of Qt designer ui files
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
# Buscar Qt (asegúrate de tener Qt instalado)
find_package(Qt5 COMPONENTS Widgets REQUIRED)
add_subdirectory(src)
# Ejecutable principal
add_executable(TestWidget main.cpp src/TWidgets/TidopWidget.h)
# Vincular bibliotecas de Qt
target_link_libraries(TestWidget PRIVATE Qt5::Widgets TWidgets::RasterFilters)
# Incluir directorios
target_include_directories(TestWidget PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)