]>
Commit | Line | Data |
---|---|---|
8662bb34 JB |
1 | --- a/ThirdParty/PSCommon/BuildSystem/CommonCppMakefile |
2 | +++ b/ThirdParty/PSCommon/BuildSystem/CommonCppMakefile | |
3 | @@ -83,8 +83,13 @@ | |
4 | OUTPUT_NAME = lib$(LIB_NAME).so | |
5 | ifneq ("$(OSTYPE)","Darwin") | |
6 | LDFLAGS += -Wl,--no-undefined | |
7 | - OUTPUT_NAME = lib$(LIB_NAME).so | |
8 | - OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS) -shared | |
9 | + ifeq "$(LIB_NAME_SOVERSION)" "" | |
10 | + OUTPUT_NAME = lib$(LIB_NAME).so | |
11 | + OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS) -shared | |
12 | + else | |
13 | + OUTPUT_NAME = lib$(LIB_NAME).so.$(LIB_NAME_SOVERSION) | |
14 | + OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS) -shared -Wl,-soname,${OUTPUT_NAME} && cd ${OUT_DIR} && ln -fs ${OUTPUT_NAME} lib$(LIB_NAME).so | |
15 | + endif | |
16 | else | |
17 | LDFLAGS += -undefined error | |
18 | OUTPUT_NAME = lib$(LIB_NAME).dylib | |
19 | --- a/Packaging/Harvest.py | |
20 | +++ b/Packaging/Harvest.py | |
21 | @@ -45,12 +45,25 @@ | |
22 | self.platformSuffix = '64' | |
23 | self.glutSuffix = '64' | |
24 | ||
25 | + def debianCopySharedObject(self, sourceDir, name, targetDir): | |
26 | + # shutil.copy(os.path.join(sourceDir, 'lib' + name + '.so'), targetDir) | |
27 | + lastFile = '' | |
28 | + for f in os.listdir(sourceDir): | |
29 | + match = re.search('lib' + name + '\.so\.[0-9\.]+',f) | |
30 | + if match: | |
31 | + shutil.copy(os.path.join(sourceDir , f), targetDir) | |
32 | + lastFile = f | |
33 | + if len(lastFile) == 0: | |
34 | + shutil.copy(os.path.join(sourceDir, 'lib' + name + '.so'),targetDir) | |
35 | + else: | |
36 | + os.symlink(lastFile,os.path.join(targetDir,'lib' + name + '.so')) | |
37 | + | |
38 | def copySharedObject(self, sourceDir, name, targetDir): | |
39 | if self.osName == 'Windows': | |
40 | shutil.copy(os.path.join(sourceDir, name + '.dll'), targetDir) | |
41 | shutil.copy(os.path.join(sourceDir, name + '.pdb'), targetDir) | |
42 | elif self.osName == 'Linux': | |
43 | - shutil.copy(os.path.join(sourceDir, 'lib' + name + '.so'), targetDir) | |
44 | + self.debianCopySharedObject(sourceDir, name, targetDir) | |
45 | elif self.osName == 'Darwin': | |
46 | shutil.copy(os.path.join(sourceDir, 'lib' + name + '.dylib'), targetDir) | |
47 | else: | |
48 | --- a/Source/Core/Makefile | |
49 | +++ b/Source/Core/Makefile | |
50 | @@ -19,8 +19,12 @@ | |
51 | LDFLAGS += -framework CoreFoundation -framework IOKit | |
52 | endif | |
53 | ||
54 | -LIB_NAME = OpenNI2 | |
55 | +MAJOR_VERSION = $(shell grep "define ONI_VERSION_MAJOR" ../../Include/OniVersion.h | cut -f 2) | |
56 | +MINOR_VERSION = $(shell grep "define ONI_VERSION_MINOR" ../../Include/OniVersion.h | cut -f 2) | |
57 | + | |
58 | ||
59 | +LIB_NAME = OpenNI2 | |
60 | +LIB_NAME_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION) | |
61 | LIB_DIRS = ../../ThirdParty/PSCommon/XnLib/Bin/$(PLATFORM)-$(CFG) | |
62 | USED_LIBS = XnLib dl pthread | |
63 | ifneq ("$(OSTYPE)","Darwin") | |
64 | #--- a/Wrappers/java/OpenNI.jni/Makefile | |
65 | #+++ b/Wrappers/java/OpenNI.jni/Makefile | |
66 | #@@ -13,6 +13,11 @@ | |
67 | # | |
68 | # LIB_NAME = OpenNI2.jni | |
69 | # | |
70 | #+MAJOR_VERSION = $(shell grep "define ONI_VERSION_MAJOR" ../../../Include/OniVersion.h | cut -f 2) | |
71 | #+MINOR_VERSION = $(shell grep "define ONI_VERSION_MINOR" ../../../Include/OniVersion.h | cut -f 2) | |
72 | #+ | |
73 | #+LIB_NAME_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION) | |
74 | #+ | |
75 | # CFLAGS += -Wall | |
76 | # | |
77 | # include ../../../ThirdParty/PSCommon/BuildSystem/CommonCppMakefile |