Selaa lähdekoodia

package/gtest: host-gtest install like a normal cmake package

Currently, host-gtest does not actually build and install gtest
libraries or header files; it just installs the gmock_gen stuff.

Host gtest can however be used by packages to build and run their
unit-tests natively.

This patch will now build and install gtest to the host like a normal
cmake package.

To limit the disruption for existing users of host-gtest, the gmock_gen
stuff is still installed (as a post-install hook now).

Signed-off-by: Paul Soucy <paul.soucy@sense.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Paul Soucy 4 vuotta sitten
vanhempi
commit
c0f9e2447d
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4 4
      package/gtest/gtest.mk

+ 4 - 4
package/gtest/gtest.mk

@@ -52,14 +52,14 @@ else
 GTEST_CONF_OPTS += -DBUILD_GMOCK=OFF
 endif
 
-define HOST_GTEST_INSTALL_CMDS
+define HOST_GTEST_POST_INSTALL_PYTHON
 	$(INSTALL) -D -m 0755 $(@D)/googlemock/scripts/generator/gmock_gen.py \
 		$(HOST_DIR)/bin/gmock_gen
 	cp -rp $(@D)/googlemock/scripts/generator/cpp \
 		$(HOST_GTEST_GMOCK_PYTHONPATH)
 endef
 
+HOST_GTEST_POST_INSTALL_HOOKS += HOST_GTEST_POST_INSTALL_PYTHON
+
 $(eval $(cmake-package))
-# The host package does not build anything, just installs gmock_gen stuff, so
-# it does not need to be a host-cmake-package.
-$(eval $(host-generic-package))
+$(eval $(host-cmake-package))