http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-February/061757.html
It seems the Makefile is putting the headers in include/libopenjpeg/,
cmake is putting them in include/openjpeg/, and I don't know why
debian is putting the header directly in include/. Since the Makefile
still seems to be authoritative, I suggest this small patch so that
make and cmake put the header in the same place:
--- OpenJPEG_v1_3.orig/libopenjpeg/CMakeLists.txt 2009-02-09
11:46:15.000000000 -0600
+++ OpenJPEG_v1_3/libopenjpeg/CMakeLists.txt 2009-02-09
11:54:21.000000000 -0600
@@ -41,4 +41,4 @@
# Install includes files
INSTALL(FILES openjpeg.h
- DESTINATION ${INCLUDE_INSTALL_DIR}/openjpeg)
+ DESTINATION ${INCLUDE_INSTALL_DIR}/libopenjpeg)
Please merge. :)
> INSTALL(FILES openjpeg.h
> - DESTINATION ${INCLUDE_INSTALL_DIR}/openjpeg)
> + DESTINATION ${INCLUDE_INSTALL_DIR}/libopenjpeg)
The makefile may be authoritative, but openjpeg is shorter, and the
'lib' prefix is surprising on nonunix system.
This is a much bigger patch, because the system headers are in the
libopenjpeg source directory, so compiling with -I$(topsrcdir) doesn't
work anymore. Other projects solve this by putting the public headers
in $(topsrcdir)/include/openjpeg so -I(topsrcdir)/include works.
Or one can rewrite the path on install. Since the files in the codec
directory don't use the system include path anyway.
-r
Hmmm. Either way, they should put them in the same place. Putting them
in different places depending on what you build with is confusing
people. :)
--- OpenJPEG_v1_3.orig/Makefile 2007-12-21 04:39:41.000000000 -0600
+++ OpenJPEG_v1_3/Makefile 2009-02-09 12:41:10.000000000 -0600
@@ -40,7 +40,7 @@
install -m 644 $(STATICLIB) dist
install -m 755 $(SHAREDLIB) dist
ln -sf $(SHAREDLIB) dist/$(LIBNAME)
- install libopenjpeg/openjpeg.h dist
+ install openjpeg/openjpeg.h dist
dos2unix:
@$(DOS2UNIX) $(SRCS) $(INCLS)
@@ -62,7 +62,7 @@
ranlib '$(DESTDIR)$(INSTALL_LIBDIR)/$(STATICLIB)'
install -m 755 -o root -g root $(SHAREDLIB)
'$(DESTDIR)$(INSTALL_LIBDIR)'
ln -sf $(SHAREDLIB) '$(DESTDIR)$(INSTALL_LIBDIR)/$(LIBNAME)'
- install -m 644 -o root -g root libopenjpeg/openjpeg.h
'$(DESTDIR)$(INSTALL_INCLUDE)'
+ install -m 644 -o root -g root openjpeg/openjpeg.h
'$(DESTDIR)$(INSTALL_INCLUDE)'
-ldconfig
clean:
Only in OpenJPEG_v1_3: Makefile~
diff -ur OpenJPEG_v1_3.orig/Makefile.osx OpenJPEG_v1_3/Makefile.osx
--- OpenJPEG_v1_3.orig/Makefile.osx 2009-02-09 11:46:15.000000000 -0600
+++ OpenJPEG_v1_3/Makefile.osx 2009-02-09 12:40:58.000000000 -0600
@@ -40,7 +40,7 @@
install -m 644 $(STATICLIB) dist
install -m 755 $(SHAREDLIB) dist
ln -sf $(SHAREDLIB) dist/$(LIBNAME)
- install libopenjpeg/openjpeg.h dist
+ install openjpeg/openjpeg.h dist
OpenJPEG: $(STATICLIB) $(SHAREDLIB)
@@ -59,7 +59,7 @@
ranlib '$(DESTDIR)$(INSTALL_LIBDIR)/$(STATICLIB)'
install -m 755 -o root -g wheel $(SHAREDLIB)
'$(DESTDIR)$(INSTALL_LIBDIR)'
ln -sf $(SHAREDLIB) '$(DESTDIR)$(INSTALL_LIBDIR)/$(LIBNAME)'
- install -m 644 -o root -g wheel ./libopenjpeg/openjpeg.h
'$(DESTDIR)$(INSTALL_INCLUDE)'
+ install -m 644 -o root -g wheel ./openjpeg/openjpeg.h
'$(DESTDIR)$(INSTALL_INCLUDE)'
clean:
rm -rf core dist/ u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB)
$(LIBNAME)
> This is a much bigger patch, because the system headers are in the
> libopenjpeg source directory, so compiling with -I$(topsrcdir) doesn't
> work anymore. Other projects solve this by putting the public headers
> in $(topsrcdir)/include/openjpeg so -I(topsrcdir)/include works.
Us Linux distribution people like to keep things out of include/,
there's potential for name collisions among packages. Subfolders help
mitigate this, and like I said we really need to do pkg-config, then
buildsystems can just do `pkg-config openjpeg --cflags` to find the
headers wherever they may be. This also allows us to do things like
parallel installs of different versions. This is the proper, standard
way to do things on current Linux/unix systems.
http://en.wikipedia.org/wiki/Pkg-config
> Or one can rewrite the path on install. Since the files in the codec
> directory don't use the system include path anyway.
We want to avoid distributions diverging from upstream as much as
possible. Being on the same page makes life easier for our users. :)