cppcms.mk 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ################################################################################
  2. #
  3. # cppcms
  4. #
  5. ################################################################################
  6. CPPCMS_VERSION = 2.0.0-beta2
  7. CPPCMS_SOURCE = cppcms-$(subst -,.,$(CPPCMS_VERSION)).tar.bz2
  8. CPPCMS_LICENSE = MIT, BSL-1.0 (boost), Public Domain (json2.js), Zlib (md5)
  9. CPPCMS_LICENSE_FILES = COPYING.TXT MIT.TXT THIRD_PARTY_SOFTWARE.TXT
  10. CPPCMS_SITE = http://downloads.sourceforge.net/project/cppcms/cppcms/$(CPPCMS_VERSION)
  11. CPPCMS_INSTALL_STAGING = YES
  12. CPPCMS_CXXFLAGS = $(TARGET_CXXFLAGS)
  13. # disable rpath to avoid getting /usr/lib added to the link search
  14. # path
  15. CPPCMS_CONF_OPTS = \
  16. -DCMAKE_SKIP_RPATH=ON \
  17. -DCMAKE_CXX_FLAGS="$(CPPCMS_CXXFLAGS)"
  18. CPPCMS_DEPENDENCIES = host-python3 pcre
  19. ifeq ($(BR2_PACKAGE_CPPCMS_ICU),y)
  20. CPPCMS_CONF_OPTS += -DDISABLE_ICU_LOCALE=OFF
  21. CPPCMS_DEPENDENCIES += icu
  22. CPPCMS_CXXFLAGS += "`$(STAGING_DIR)/usr/bin/icu-config --cxxflags`"
  23. else
  24. CPPCMS_CONF_OPTS += -DDISABLE_ICU_LOCALE=ON
  25. endif
  26. ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
  27. CPPCMS_CONF_OPTS += -DDISABLE_GCRYPT=OFF
  28. CPPCMS_DEPENDENCIES += libgcrypt
  29. else
  30. CPPCMS_CONF_OPTS += -DDISABLE_GCRYPT=ON
  31. endif
  32. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  33. CPPCMS_CONF_OPTS += -DDISABLE_OPENSSL=OFF
  34. CPPCMS_DEPENDENCIES += openssl
  35. else
  36. CPPCMS_CONF_OPTS += -DDISABLE_OPENSSL=ON
  37. endif
  38. ifeq ($(BR2_PACKAGE_ZLIB),y)
  39. CPPCMS_CONF_OPTS += -DDISABLE_GZIP=OFF
  40. CPPCMS_DEPENDENCIES += zlib
  41. else
  42. CPPCMS_CONF_OPTS += -DDISABLE_GZIP=ON
  43. endif
  44. ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
  45. # posix backend needs monetary.h which isn't available on uClibc
  46. CPPCMS_CONF_OPTS += -DDISABLE_POSIX_LOCALE=on
  47. endif
  48. # We copy cppcms_tmpl_cc from staging to host because this file can be
  49. # needed for compiling packages using cppcms. And it is not worth
  50. # creating a host package just for a python script.
  51. define CPPCMS_INSTALL_HOST_TOOLS
  52. cp $(STAGING_DIR)/usr/bin/cppcms_tmpl_cc $(HOST_DIR)/bin/cppcms_tmpl_cc
  53. endef
  54. CPPCMS_POST_INSTALL_STAGING_HOOKS += CPPCMS_INSTALL_HOST_TOOLS
  55. $(eval $(cmake-package))