liblo: switch to CMake 12635/head
authorRosen Penev <rosenp@gmail.com>
Sun, 28 Jun 2020 02:32:02 +0000 (19:32 -0700)
committerRosen Penev <rosenp@gmail.com>
Sun, 28 Jun 2020 05:02:20 +0000 (22:02 -0700)
Allows simplifying the Makefile.

Make tools option conditional on package selection.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/liblo/Makefile

index 8a5b20f14377d74154b018f40635719b0903db73..20d5536954c93ea5a4d30d186df3e7ee9717b0d5 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=liblo
 PKG_VERSION:=0.31
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/liblo
@@ -19,10 +19,13 @@ PKG_MAINTAINER:=
 PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
+CMAKE_SOURCE_SUBDIR:=cmake
 PKG_BUILD_PARALLEL:=1
+PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_liblo-utils
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/liblo/Default
   TITLE:=Lightweight Open Sound Control (OSC)
@@ -45,21 +48,13 @@ $(call Package/liblo/Default)
   DEPENDS:= +liblo
 endef
 
-CONFIGURE_ARGS += \
-       $(if $(CONFIG_IPV6),--enable,--disable)-ipv6 \
-       --enable-threads \
-       --disable-examples \
-       --disable-network-tests \
-       --disable-tests
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/lo $(1)/usr/include/
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblo.* $(1)/usr/lib/
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/liblo.pc $(1)/usr/lib/pkgconfig/
-endef
+CMAKE_OPTIONS += \
+       -DWITH_TOOLS=O$(if $(CONFIG_PACKAGE_liblo-utils),N,FF) \
+       -DWITH_TESTS=OFF \
+       -DWITH_EXAMPLES=OFF \
+       -DWITH_CPP_TESTS=OFF \
+       -DWITH_STATIC=OFF \
+       -DTHREADING=ON
 
 define Package/liblo/install
        $(INSTALL_DIR) $(1)/usr/lib