이 스크립트를 사용하여 hpux에서 Tigervnc를 구성합니다. cmake는 최신 3.4.3입니다. zlib는 최신 2.8이지만 스크립트가 실패합니다. 이유는 무엇입니까?
export PATH=$PATH:/opt/cmake/bin/
export CC="/usr/local/bin/gcc"
export HPUXLDFLAGS='-L/usr/local/lib/hpux32'
export HPUXCFLAGS='-I/usr/local/include'
export LDFLAGS="$HPUXLDFLAGS"
export CFLAGS="$HPUXCFLAGS"
cmake \
-G "Unix Makefiles" \
-DCMAKE_C_FLAGS:STRING="$HPUXCFLAGS" \
-DCMAKE_LD_FLAGS:STRING="$HPUXLDFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$HPUXCFLAGS" \
-Wno-dev \
-DCMAKE_INSTALL_PREFIX=/opt/tigervnc \
-DMAN_INSTALL_DIR=/opt/tigervnc/man \
-DSYSCONF_INSTALL_DIR=/etc/opt/tigervnc \
-DENABLE_PAM:BOOL=OFF \
-DBUILD_JAVA:BOOL=ON \
..
다음 줄로 인해 스크립트가 실패합니다.
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/hpux32/libX11.so
CMake Error at /opt/cmake/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.8")
Call Stack (most recent call first):
/opt/cmake/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
/opt/cmake/share/cmake-3.4/Modules/FindZLIB.cmake:124 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:125 (find_package)
내 스크립트에 문제가 있나요?
답변1
솔루션을 찾았으며 내보내는 대신 이를 사용해야 했습니다.
cmake \
-G "Unix Makefiles" \
-DCMAKE_C_FLAGS:STRING="$HPUXCFLAGS" \
-DCMAKE_LD_FLAGS:STRING="$HPUXLDFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$HPUXCFLAGS" \
-DZLIB_LIBRARY="/usr/local/lib/hpux32" \
-DZLIB_INCLUDE_DIR="/usr/local/include" \
-Wno-dev \
-DCMAKE_INSTALL_PREFIX=/opt/tigervnc \
-DMAN_INSTALL_DIR=/opt/tigervnc/man \
-DSYSCONF_INSTALL_DIR=/etc/opt/tigervnc \
-DENABLE_PAM:BOOL=OFF \
-DBUILD_JAVA:BOOL=ON \