libpng备份
问题:
因libpng15安装在默认路径(/usr/local)下,正常来说会先寻找/usr/include路径再寻找/usr/local/include,但不知何故OSSIM编译时找到的头文件是/usr/local/include里的,造成include与lib匹配不上。
暂时解决方案:
编译png1.5版本时,使用./configure --prefix=/usr/local/png15指定安装路径,最好不要安装在默认路径/usr/local下(当计算机中安装有多个版本时,会造成头文件与lib库无法匹配)
使用libpng15的Podofo编译时注意指定libpng位置:
cmake -G "Unix Makefiles" ../podofo-0.9.0 -DCMAKE_INSTALL_PREFIX=/usr/local/podofo \
-DCMAKE_INCLUDE_PATH=/usr/local/png15/include \
-DCMAKE_LIBRARY_PATH=/usr/local/png15/lib \
-DPODOFO_BUILD_SHARED:BOOL=TRUE \
-DPODOFO_BUILD_STATIC:BOOL=TRUE
通过CMAKE_INCLUDE_PATH、CMAKE_LIBRARY_PATH设置依赖的头文件路径和依赖库路径;
OSSIM编译注意:../configure.sh .. -G "Unix Makefiles",configure.sh中进行各编译参数的设置
build_dir=$OSSIM_DEV_HOME
install_dir=$OSSIM_INSTALL_PREFIX
cmake .. -G "Unix Makefiles" \
-DOSSIMPLANET_ENABLE_EPHEMERIS=ON \
-DBUILD_OSSIMPREDATOR=ON \
-DBUILD_OSSIM_TEST_APPS=ON \
-DBUILD_RAPIER_TEST_APPS=ON \
-DBUILD_RUNTIME_DIR=bin \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_WMS=ON \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_INCLUDE_PATH=$OSSIM_DEPENDENCIES/include \
-DCMAKE_INCLUDE_PATH=$OSSIM_DEPENDENCIES/include \
-DCMAKE_INSTALL_PREFIX=$install_dir \
-DCMAKE_LIBRARY_PATH=/usr/local/podofo/lib \
-DCMAKE_MODULE_PATH=$build_dir/ossim_package_support/cmake/CMakeModules \
-DHDF5_LIBRARIES="hdf5;hdf5_cpp" \
-DKAKADU_ROOT_SRC=$build_dir/kakadu/latest \
-DKAKADU_AUX_LIBRARY=$install_dir/KDU79/libkdu_v79R.so \
-DKAKADU_LIBRARY=$install_dir/KDU79/libkdu_v79R.so \
-DOSSIMPLANET_ENABLE_EPHEMERIS=ON \
$build_dir/ossim_package_support/cmake/