Add test for installation of libraries in subprojects

The original test's subproject-install check had to be removed because
library names are now properly platform-specific
pull/417/head
Nirbheek Chauhan 9 years ago
parent 45c8557dc6
commit 8ad4779a05
  1. 3
      test cases/linuxlike/8 subproject library install/installed_files.txt
  2. 6
      test cases/linuxlike/8 subproject library install/meson.build
  3. 21
      test cases/linuxlike/8 subproject library install/subprojects/sublib/include/subdefs.h
  4. 10
      test cases/linuxlike/8 subproject library install/subprojects/sublib/meson.build
  5. 5
      test cases/linuxlike/8 subproject library install/subprojects/sublib/sublib.c

@ -0,0 +1,3 @@
usr/lib/libsublib.so
usr/lib/libsublib.so.5
usr/lib/libsublib.so.2.1.0

@ -0,0 +1,6 @@
project('subproj lib install', 'c',
version : '2.3.4',
license : 'mylicense')
# Test that the subproject library gets installed
subproject('sublib', version : '1.0.0')

@ -0,0 +1,21 @@
#ifndef SUBDEFS_H_
#define SUBDEFS_H_
#if defined _WIN32 || defined __CYGWIN__
#if defined BUILDING_SUB
#define DLL_PUBLIC __declspec(dllexport)
#else
#define DLL_PUBLIC __declspec(dllimport)
#endif
#else
#if defined __GNUC__
#define DLL_PUBLIC __attribute__ ((visibility("default")))
#else
#pragma message ("Compiler does not support symbol visibility.")
#define DLL_PUBLIC
#endif
#endif
int DLL_PUBLIC subfunc();
#endif

@ -0,0 +1,10 @@
project('subproject', 'c',
version : '1.0.0',
license : ['sublicense1', 'sublicense2'])
i = include_directories('include')
shared_library('sublib', 'sublib.c',
version : '2.1.0',
soversion : 5,
include_directories : i, install : true,
c_args : '-DBUILDING_SUB=2')

@ -0,0 +1,5 @@
#include<subdefs.h>
int DLL_PUBLIC subfunc() {
return 42;
}
Loading…
Cancel
Save