Cmake for UI files auto link

this is one of the errors:
the ui files must be linked and changed to h files
so the h files found in the code by preprocessor
This commit is contained in:
Simon De Backer 2020-12-09 10:40:12 +01:00
parent 6556fbaf38
commit d89d1088a3
4 changed files with 21 additions and 1 deletions

View File

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
message(
"_____________________________________________________________________"
@ -41,6 +41,11 @@ project(qelectrotech
HOMEPAGE_URL "https://qelectrotech.org/"
LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
SET(CMAKE_CXX_STANDARD 17)
set(QET_DIR ${PROJECT_SOURCE_DIR})
execute_process(

View File

@ -20,6 +20,11 @@ message("_____________________________________________________________________")
project(C_unittests LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
SET(CMAKE_CXX_STANDARD 17)
if(DEFINED ENV{QET_DIR})
set(QET_DIR "../..")
message("QET_DIR is not set, assuming QET is ../..")

View File

@ -20,6 +20,11 @@ message("_____________________________________________________________________")
project(G_unittests LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
SET(CMAKE_CXX_STANDARD 17)
if(DEFINED ENV{QET_DIR})
set(QET_DIR "../..")
message("QET_DIR is not set, assuming QET is ../..")

View File

@ -20,6 +20,11 @@ message("_____________________________________________________________________")
project(qt_unittests LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
SET(CMAKE_CXX_STANDARD 17)
if(DEFINED ENV{QET_DIR})
set(QET_DIR "../..")
message("QET_DIR is not set, assuming QET is ../..")