|
@@ -0,0 +1,60 @@
|
|
|
+includes("@builtin/check")
|
|
|
+configvar_check_cincludes("COINUTILS_HAS_CSTDINT", "cstdint")
|
|
|
+configvar_check_cincludes("COINUTILS_HAS_STDINT_H", "stdint.h")
|
|
|
+-- configvar_check_cincludes("COIN_HAS_BLAS", "cblas.h")
|
|
|
+-- configvar_check_cincludes("COIN_HAS_GLPK", "glpk.h")
|
|
|
+-- configvar_check_cincludes("COIN_HAS_LAPACK", "lapacke_utils.h")
|
|
|
+configvar_check_cincludes("HAVE_CFLOAT", "cfloat")
|
|
|
+configvar_check_cincludes("HAVE_CIEEEFP", "cieeefp")
|
|
|
+configvar_check_cincludes("HAVE_CINTTYPES", "cinttypes")
|
|
|
+configvar_check_cincludes("HAVE_CMATH", "cmath")
|
|
|
+configvar_check_cincludes("HAVE_CSTDINT", "cstdint")
|
|
|
+configvar_check_cincludes("HAVE_DLFCN_H", "dlfcn.h")
|
|
|
+configvar_check_cincludes("HAVE_ENDIAN_H", "endian.h")
|
|
|
+configvar_check_cincludes("HAVE_FLOAT_H", "float.h")
|
|
|
+configvar_check_cincludes("HAVE_IEEEFP_H", "ieeefp.h")
|
|
|
+configvar_check_cincludes("HAVE_INTTYPES_H", "inttypes.h")
|
|
|
+configvar_check_cincludes("HAVE_MATH_H", "math.h")
|
|
|
+configvar_check_cincludes("HAVE_MEMORY_H", "memory.h")
|
|
|
+configvar_check_cincludes("HAVE_STDINT_H", "stdint.h")
|
|
|
+configvar_check_cincludes("HAVE_STDLIB_H", "stdlib.h")
|
|
|
+configvar_check_cincludes("HAVE_STRINGS_H", "strings.h")
|
|
|
+configvar_check_cincludes("HAVE_STRING_H", "string.h")
|
|
|
+configvar_check_cincludes("HAVE_SYS_STAT_H", "sys/stat.h")
|
|
|
+configvar_check_cincludes("HAVE_SYS_TYPES_H", "sys/types.h")
|
|
|
+configvar_check_cincludes("HAVE_UNISTD_H", "unistd.h")
|
|
|
+configvar_check_cincludes("HAVE_WINDOWS_H", "windows.h")
|
|
|
+check_sizeof("SIZEOF_DOUBLE", "double")
|
|
|
+check_sizeof("SIZEOF_INT", "int")
|
|
|
+check_sizeof("SIZEOF_INT_P", "int *")
|
|
|
+check_sizeof("SIZEOF_LONG", "long")
|
|
|
+check_sizeof("SIZEOF_LONG_LONG", "long long")
|
|
|
+configvar_check_cincludes("STDC_HEADERS", {"stdlib.h", "string.h"})
|
|
|
+
|
|
|
+add_rules("mode.debug", "mode.release")
|
|
|
+
|
|
|
+add_requires("bzip2", "zlib")
|
|
|
+add_defines("COIN_HAS_ZLIB", "COIN_HAS_BZLIB")
|
|
|
+if is_plat("linux", "macosx", "bsd") then
|
|
|
+ add_requires("readline")
|
|
|
+ add_packages("readline")
|
|
|
+ add_defines("COIN_HAS_READLINE")
|
|
|
+end
|
|
|
+
|
|
|
+set_languages("c++11")
|
|
|
+
|
|
|
+target("CoinUtils")
|
|
|
+ set_kind("$(kind)")
|
|
|
+ add_files("CoinUtils/src/*.cpp")
|
|
|
+ add_headerfiles("CoinUtils/src/*.hpp", "CoinUtils/src/*.h", {prefixdir = "coin"})
|
|
|
+ add_configfiles("CoinUtils/src/(config.h.in)", {filename = "config.h"})
|
|
|
+ add_configfiles("CoinUtils/src/(config_coinutils.h.in)", {filename = "config_coinutils.h"})
|
|
|
+ if is_plat("windows") and is_kind("shared") then
|
|
|
+ add_rules("utils.symbols.export_all", {export_classes = true})
|
|
|
+ end
|
|
|
+ add_packages("bzip2", "zlib")
|
|
|
+ if is_plat("macosx", "iphoneos") then
|
|
|
+ add_frameworks("Accelerate")
|
|
|
+ elseif is_plat("linux", "bsd") then
|
|
|
+ add_syslinks("m")
|
|
|
+ end
|