diff --git a/repos/libports/lib/import/import-qt6_cmake.mk b/repos/libports/lib/import/import-qt6_cmake.mk index 2f150e17c6..e9ef66d25b 100644 --- a/repos/libports/lib/import/import-qt6_cmake.mk +++ b/repos/libports/lib/import/import-qt6_cmake.mk @@ -1,10 +1,12 @@ # # The following externally defined variables are evaluated: # -# CMAKE_LISTS_DIR: path to the CMakeLists.txt file -# CMAKE_TARGET_BINARIES binaries to be stripped and linked into 'bin' and 'debug' directories -# QT6_PORT_LIBS: Qt6 libraries used from port (for example libQt6Core) -# QT6_COMPONENT_LIB_SO: if defined empty, disables linking with qt6_component.lib.so +# CMAKE_LISTS_DIR: path to the CMakeLists.txt file +# CMAKE_TARGET_BINARIES binaries to be stripped and linked into 'bin' and 'debug' directories +# QT6_PORT_LIBS: Qt6 libraries used from port (for example libQt6Core) +# QT6_COMPONENT_LIB_SO: if defined empty, disables linking with qt6_component.lib.so +# QT6_TARGET_DEPS: default is 'build_with_cmake' +# QT6_EXTRA_TARGET_DEPS: additional target dependencies # include $(call select_from_repositories,lib/import/import-qt6.inc) @@ -135,8 +137,11 @@ endif BUILD_ARTIFACTS += $(notdir $(CMAKE_TARGET_BINARIES)) # -# build applications with CMake +# build with CMake by default # + +QT6_TARGET_DEPS ?= build_with_cmake + TARGET ?= $(CMAKE_LISTS_DIR).cmake_target .PHONY: $(TARGET) -$(TARGET): build_with_cmake $(QT6_EXTRA_TARGET_DEPS) +$(TARGET): $(QT6_TARGET_DEPS) $(QT6_EXTRA_TARGET_DEPS) diff --git a/repos/libports/lib/import/import-qt6_qmake.mk b/repos/libports/lib/import/import-qt6_qmake.mk index f0bac79932..5b4e340444 100644 --- a/repos/libports/lib/import/import-qt6_qmake.mk +++ b/repos/libports/lib/import/import-qt6_qmake.mk @@ -1,10 +1,12 @@ # # The following externally defined variables are evaluated: # -# QMAKE_PROJECT_FILE: path to the qmake project file (for applications with target.mk) -# QMAKE_TARGET_BINARIES binaries to be stripped and linked into 'bin' and 'debug' directories -# QT6_PORT_LIBS: Qt6 libraries used from port (for example libQt6Core) -# QT6_COMPONENT_LIB_SO: if defined empty, disables linking with qt6_component.lib.so +# QMAKE_PROJECT_FILE: path to the qmake project file (for applications with target.mk) +# QMAKE_TARGET_BINARIES binaries to be stripped and linked into 'bin' and 'debug' directories +# QT6_PORT_LIBS: Qt6 libraries used from port (for example libQt6Core) +# QT6_COMPONENT_LIB_SO: if defined empty, disables linking with qt6_component.lib.so +# QT6_TARGET_DEPS: default is 'build_with_qmake' +# QT6_EXTRA_TARGET_DEPS: additional target dependencies # include $(call select_from_repositories,lib/import/import-qt6.inc) @@ -169,8 +171,11 @@ build_with_qmake: qmake_prepared.tag qt6_so_files BUILD_ARTIFACTS += $(notdir $(QMAKE_TARGET_BINARIES)) # -# build applications with qmake +# build with qmake by default # + +QT6_TARGET_DEPS ?= build_with_qmake + TARGET ?= $(notdir $(QMAKE_PROJECT_FILE)).qmake_target .PHONY: $(TARGET) -$(TARGET): build_with_qmake $(QT6_EXTRA_TARGET_DEPS) +$(TARGET): $(QT6_TARGET_DEPS) $(QT6_EXTRA_TARGET_DEPS) diff --git a/repos/libports/recipes/src/qt6_base/content.mk b/repos/libports/recipes/src/qt6_base/content.mk index cab57805c3..e8383e1f2b 100644 --- a/repos/libports/recipes/src/qt6_base/content.mk +++ b/repos/libports/recipes/src/qt6_base/content.mk @@ -1,4 +1,4 @@ -MIRROR_FROM_REP_DIR := lib/mk/qt6_base.mk +MIRROR_FROM_REP_DIR := src/qt6/base/target.mk content: $(MIRROR_FROM_REP_DIR) diff --git a/repos/libports/recipes/src/qt6_declarative/content.mk b/repos/libports/recipes/src/qt6_declarative/content.mk index c57fc46e9e..cd6776c727 100644 --- a/repos/libports/recipes/src/qt6_declarative/content.mk +++ b/repos/libports/recipes/src/qt6_declarative/content.mk @@ -1,4 +1,4 @@ -MIRROR_FROM_REP_DIR := lib/mk/qt6_declarative.mk +MIRROR_FROM_REP_DIR := src/qt6/declarative/target.mk content: $(MIRROR_FROM_REP_DIR) diff --git a/repos/libports/recipes/src/qt6_shadertools/content.mk b/repos/libports/recipes/src/qt6_shadertools/content.mk index fd1de80eb7..7b5efaad0f 100644 --- a/repos/libports/recipes/src/qt6_shadertools/content.mk +++ b/repos/libports/recipes/src/qt6_shadertools/content.mk @@ -1,4 +1,4 @@ -MIRROR_FROM_REP_DIR := lib/mk/qt6_shadertools.mk +MIRROR_FROM_REP_DIR := src/qt6/shadertools/target.mk content: $(MIRROR_FROM_REP_DIR) diff --git a/repos/libports/recipes/src/qt6_svg/content.mk b/repos/libports/recipes/src/qt6_svg/content.mk index b3c35bbefb..999fabd87c 100644 --- a/repos/libports/recipes/src/qt6_svg/content.mk +++ b/repos/libports/recipes/src/qt6_svg/content.mk @@ -1,4 +1,4 @@ -MIRROR_FROM_REP_DIR := lib/mk/qt6_svg.mk +MIRROR_FROM_REP_DIR := src/qt6/svg/target.mk content: $(MIRROR_FROM_REP_DIR) diff --git a/repos/libports/lib/mk/qt6_base.mk b/repos/libports/src/qt6/base/target.mk similarity index 98% rename from repos/libports/lib/mk/qt6_base.mk rename to repos/libports/src/qt6/base/target.mk index f5631041b8..98c6f46633 100644 --- a/repos/libports/lib/mk/qt6_base.mk +++ b/repos/libports/src/qt6/base/target.mk @@ -1,3 +1,5 @@ +TARGET = qt6_base.cmake_target + LIBS = qt6_cmake ldso_so_support libc libm stdcxx qt6_component egl mesa base qoost INSTALL_LIBS = lib/libQt6Concurrent.lib.so \ @@ -113,6 +115,4 @@ build: cmake_prepared.tag .PHONY: build -ifeq ($(called_from_lib_mk),yes) -all: build -endif +QT6_TARGET_DEPS = build diff --git a/repos/libports/lib/mk/qt6_declarative.mk b/repos/libports/src/qt6/declarative/target.mk similarity index 99% rename from repos/libports/lib/mk/qt6_declarative.mk rename to repos/libports/src/qt6/declarative/target.mk index 80e65b7bb8..f23ef26ac5 100644 --- a/repos/libports/lib/mk/qt6_declarative.mk +++ b/repos/libports/src/qt6/declarative/target.mk @@ -1,3 +1,5 @@ +TARGET = qt6_declarative.cmake_target + QT6_PORT_LIBS = libQt6Core libQt6Gui libQt6OpenGL libQt6Network libQt6Sql libQt6Test libQt6Widgets LIBS = qt6_cmake ldso_so_support libc libm mesa egl qt6_component stdcxx @@ -135,6 +137,4 @@ build: cmake_prepared.tag qt6_so_files .PHONY: build -ifeq ($(called_from_lib_mk),yes) -all: build -endif +QT6_TARGET_DEPS = build diff --git a/repos/libports/lib/mk/qt6_shadertools.mk b/repos/libports/src/qt6/shadertools/target.mk similarity index 97% rename from repos/libports/lib/mk/qt6_shadertools.mk rename to repos/libports/src/qt6/shadertools/target.mk index 1d955844b8..ba16478e6d 100644 --- a/repos/libports/lib/mk/qt6_shadertools.mk +++ b/repos/libports/src/qt6/shadertools/target.mk @@ -1,3 +1,5 @@ +TARGET = qt6_shadertools.cmake_target + QT6_PORT_LIBS = libQt6Core libQt6Gui LIBS = qt6_cmake ldso_so_support libc libm egl mesa qt6_component stdcxx @@ -66,6 +68,4 @@ build: cmake_prepared.tag qt6_so_files .PHONY: build -ifeq ($(called_from_lib_mk),yes) -all: build -endif +QT6_TARGET_DEPS = build diff --git a/repos/libports/lib/mk/qt6_svg.mk b/repos/libports/src/qt6/svg/target.mk similarity index 97% rename from repos/libports/lib/mk/qt6_svg.mk rename to repos/libports/src/qt6/svg/target.mk index 57806e29f0..839d06843c 100644 --- a/repos/libports/lib/mk/qt6_svg.mk +++ b/repos/libports/src/qt6/svg/target.mk @@ -1,3 +1,5 @@ +TARGET = qt6_svg.cmake_target + QT6_PORT_LIBS = libQt6Core libQt6Gui libQt6Widgets LIBS = qt6_cmake ldso_so_support libc libm egl mesa qt6_component stdcxx @@ -66,6 +68,4 @@ build: cmake_prepared.tag qt6_so_files .PHONY: build -ifeq ($(called_from_lib_mk),yes) -all: build -endif +QT6_TARGET_DEPS = build