add make install target

This commit is contained in:
Sears Russell 2009-04-29 20:22:41 +00:00
parent 55c43358b6
commit f947a2b417
2 changed files with 14 additions and 1 deletions

View file

@ -58,8 +58,19 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/src
/usr/include)
# set linker path for this and all subdirs
LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/src/stasis ${CMAKE_CURRENT_BINARY_DIR}/src/libdfa)
LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/src/stasis)
SET(COMMON_LIBRARIES stasis m pthread)
SET(CMAKE_C_FLAGS "-g -Wall -pedantic -std=gnu99 -DPBL_COMPAT ${CMAKE_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "-g -Wall -Wno-variadic-macros -Wno-long-long -pedantic -DPBL_COMPAT ${CMAKE_CXX_FLAGS}")
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/stasis
DESTINATION include/
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
PATTERN ".deps" EXCLUDE)
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/stasis
DESTINATION include/
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
PATTERN ".deps" EXCLUDE)

View file

@ -33,3 +33,5 @@ ADD_LIBRARY(stasis crc32.c redblack.c lhtable.c rw.c doubleLinkedList.c
bufferManager/pageArray.c
bufferManager/bufferHash.c replacementPolicy/lru.c
replacementPolicy/lruFast.c)
INSTALL(TARGETS stasis LIBRARY DESTINATION lib)