parent
05c28beacd
commit
a8473d76f3
@ -1,5 +1,5 @@
|
||||
# CMake version number components.
|
||||
set(CMake_VERSION_MAJOR 3)
|
||||
set(CMake_VERSION_MINOR 13)
|
||||
set(CMake_VERSION_PATCH 2)
|
||||
set(CMake_VERSION_PATCH 4)
|
||||
#set(CMake_VERSION_RC 0)
|
||||
|
@ -0,0 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
@ -0,0 +1,8 @@
|
||||
^CMake Warning \(dev\) in CMakeLists.txt:
|
||||
AUTOGEN: No valid Qt version found for target main. AUTOMOC, AUTOUIC,
|
||||
AUTORCC disabled. Consider adding:
|
||||
|
||||
find_package\(Qt5 COMPONENTS Widgets\)
|
||||
|
||||
to your CMakeLists.txt file.
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
@ -0,0 +1,6 @@
|
||||
enable_language(CXX)
|
||||
|
||||
add_executable(main empty.cpp)
|
||||
set_property(TARGET main PROPERTY AUTOMOC 1)
|
||||
set_property(TARGET main PROPERTY AUTORCC 1)
|
||||
set_property(TARGET main PROPERTY AUTOUIC 1)
|
@ -0,0 +1,13 @@
|
||||
enable_language(CXX)
|
||||
|
||||
function (use_autogen target)
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
|
||||
set(Qt5Core_VERSION_MAJOR "${Qt5Core_VERSION_MAJOR}" PARENT_SCOPE)
|
||||
set(Qt5Core_VERSION_MINOR "${Qt5Core_VERSION_MINOR}" PARENT_SCOPE)
|
||||
set_property(TARGET "${target}" PROPERTY AUTOMOC 1)
|
||||
set_property(TARGET "${target}" PROPERTY AUTORCC 1)
|
||||
set_property(TARGET "${target}" PROPERTY AUTOUIC 1)
|
||||
endfunction ()
|
||||
|
||||
add_executable(main empty.cpp)
|
||||
use_autogen(main)
|
@ -0,0 +1,8 @@
|
||||
^CMake Warning \(dev\) in CMakeLists.txt:
|
||||
AUTOGEN: No valid Qt version found for target main. AUTOMOC, AUTOUIC,
|
||||
AUTORCC disabled. Consider adding:
|
||||
|
||||
find_package\(Qt5 COMPONENTS Widgets\)
|
||||
|
||||
to your CMakeLists.txt file.
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
@ -0,0 +1,17 @@
|
||||
enable_language(CXX)
|
||||
|
||||
function (use_autogen target)
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
|
||||
set(Qt5Core_VERSION_MAJOR "${Qt5Core_VERSION_MAJOR}" PARENT_SCOPE)
|
||||
set(Qt5Core_VERSION_MINOR "${Qt5Core_VERSION_MINOR}" PARENT_SCOPE)
|
||||
set_property(TARGET "${target}" PROPERTY AUTOMOC 1)
|
||||
set_property(TARGET "${target}" PROPERTY AUTORCC 1)
|
||||
set_property(TARGET "${target}" PROPERTY AUTOUIC 1)
|
||||
endfunction ()
|
||||
|
||||
function (wrap_autogen target)
|
||||
use_autogen("${target}")
|
||||
endfunction ()
|
||||
|
||||
add_executable(main empty.cpp)
|
||||
wrap_autogen(main)
|
@ -0,0 +1,21 @@
|
||||
enable_language(CXX)
|
||||
|
||||
function (use_autogen target)
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
|
||||
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PROPERTY
|
||||
Qt5Core_VERSION_MAJOR "${Qt5Core_VERSION_MAJOR}")
|
||||
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PROPERTY
|
||||
Qt5Core_VERSION_MINOR "${Qt5Core_VERSION_MINOR}")
|
||||
set_property(TARGET "${target}" PROPERTY AUTOMOC 1)
|
||||
set_property(TARGET "${target}" PROPERTY AUTORCC 1)
|
||||
set_property(TARGET "${target}" PROPERTY AUTOUIC 1)
|
||||
endfunction ()
|
||||
|
||||
function (wrap_autogen target)
|
||||
use_autogen("${target}")
|
||||
endfunction ()
|
||||
|
||||
add_executable(main empty.cpp)
|
||||
wrap_autogen(main)
|
@ -0,0 +1,8 @@
|
||||
include(RunCMake)
|
||||
|
||||
run_cmake(NoQt)
|
||||
if (with_qt5)
|
||||
run_cmake(QtInFunction)
|
||||
run_cmake(QtInFunctionNested)
|
||||
run_cmake(QtInFunctionProperty)
|
||||
endif ()
|
@ -1,3 +1,3 @@
|
||||
^CMake Error: Error processing file: nosuchcachefile.txt
|
||||
CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/C-no-file-build/nosuchcachefile.txt" does not exist.
|
||||
CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/C-no-file-build" does not appear to contain CMakeLists.txt.
|
||||
Specify --help for usage, or press the help button on the CMake GUI.$
|
||||
|
@ -0,0 +1 @@
|
||||
1
|
@ -0,0 +1,3 @@
|
||||
^CMake Error: Error processing file: nosuchcachefile.txt
|
||||
CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/Cno-file-build" does not appear to contain CMakeLists.txt.
|
||||
Specify --help for usage, or press the help button on the CMake GUI.$
|
@ -0,0 +1 @@
|
||||
1
|
@ -0,0 +1,2 @@
|
||||
^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/D-no-src-build" does not appear to contain CMakeLists.txt.
|
||||
Specify --help for usage, or press the help button on the CMake GUI.$
|
@ -0,0 +1 @@
|
||||
1
|
@ -0,0 +1,2 @@
|
||||
^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/Dno-src-build" does not appear to contain CMakeLists.txt.
|
||||
Specify --help for usage, or press the help button on the CMake GUI.$
|
@ -0,0 +1 @@
|
||||
1
|
@ -0,0 +1,2 @@
|
||||
^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/U-no-src-build" does not appear to contain CMakeLists.txt.
|
||||
Specify --help for usage, or press the help button on the CMake GUI.$
|
@ -0,0 +1 @@
|
||||
1
|
@ -0,0 +1,2 @@
|
||||
^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/Uno-src-build" does not appear to contain CMakeLists.txt.
|
||||
Specify --help for usage, or press the help button on the CMake GUI.$
|
@ -0,0 +1,4 @@
|
||||
CMake Warning:
|
||||
No source or binary directory provided. Both will be assumed to be the
|
||||
same as the current working directory, but note that this warning will
|
||||
become a fatal error in future CMake releases.
|
@ -0,0 +1,5 @@
|
||||
enable_language(C)
|
||||
|
||||
add_library(foo SHARED foo.c)
|
||||
install(TARGETS foo LIBRARY DESTINATION lib)
|
||||
set_property(TARGET foo PROPERTY FRAMEWORK TRUE)
|
Loading…
Reference in new issue