Travis cmaketest will also run "make install" and "make uninstall"

This commit is contained in:
inikep 2016-06-03 11:40:15 +02:00
parent d36ee9b845
commit c7f008b069
2 changed files with 6 additions and 4 deletions

View File

@ -155,7 +155,7 @@ cmaketest:
cmake --version
rm -rf projects/cmake/build
mkdir projects/cmake/build
cd projects/cmake/build ; cmake $(CMAKE_PARAMS) .. ; $(MAKE)
cd projects/cmake/build ; cmake -DPREFIX:STRING=~/install_test_dir $(CMAKE_PARAMS) .. ; $(MAKE) install ; $(MAKE) uninstall
c90test: clean
CFLAGS="-std=c90" $(MAKE) all # will fail, due to // and long long

View File

@ -157,13 +157,15 @@ SET_TARGET_PROPERTIES(
OUTPUT_NAME ${SHARED_LIBRARY_OUTPUT_NAME})
IF (UNIX)
SET(PREFIX /usr/local)
IF ("${PREFIX}" STREQUAL "")
SET(PREFIX /usr/local)
ENDIF()
MESSAGE("the variable PREFIX=${PREFIX}")
SET(INSTALL_LIBRARY_DIR ${PREFIX}/lib)
SET(INSTALL_INCLUDE_DIR ${PREFIX}/include)
# install target
INSTALL(FILES ${LIBRARY_DIR}/common/zstd.h ${LIBRARY_DIR}/common/zstd_static.h ${LIBRARY_DIR}/common/zbuff.h ${LIBRARY_DIR}/common/zbuff_static.h
${LIBRARY_DIR}/common/mem.h ${LIBRARY_DIR}/common/error_public.h ${LIBRARY_DIR}/dictBuilder/zdict.h ${LIBRARY_DIR}/dictBuilder/zdict_static.h DESTINATION ${INSTALL_INCLUDE_DIR})
INSTALL(FILES ${LIBRARY_DIR}/common/zstd.h ${LIBRARY_DIR}/common/zbuff.h ${LIBRARY_DIR}/dictBuilder/zdict.h DESTINATION ${INSTALL_INCLUDE_DIR})
INSTALL(TARGETS libzstd_static DESTINATION ${INSTALL_LIBRARY_DIR})
INSTALL(TARGETS libzstd_shared LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR})