Skip to content

Instantly share code, notes, and snippets.

@yuasatakayuki
Last active August 29, 2015 14:19
Show Gist options
  • Save yuasatakayuki/0259ecc4dfed1a662603 to your computer and use it in GitHub Desktop.
Save yuasatakayuki/0259ecc4dfed1a662603 to your computer and use it in GitHub Desktop.
CMakeLists.txt for sllib
#---------------------------------------------
# CMakeLists.txt for sllib
#---------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
SET(CMAKE_C_FLAGS_RELEASE "-Wall -O3")
SET(CMAKE_C_FLAGS_DEBUG "-g")
SET(CMAKE_BUILD_TYPE Release)
PROJECT(sllib CXX)
SET(serial "1.4.2")
SET(soserial "3")
set(sllib_SOURCES
cstreamio.cc stdstreamio.cc gzstreamio.cc bzstreamio.cc
pipestreamio.cc termlineio.cc termscreenio.cc inetstreamio.cc
httpstreamio.cc ftpstreamio.cc digeststreamio.cc
tregex.cc tstring.cc tarray_tstring.cc asarray_tstring.cc
mdarray.cc mdarray_float.cc mdarray_double.cc
mdarray_uchar.cc mdarray_short.cc mdarray_int.cc mdarray_long.cc
mdarray_llong.cc mdarray_int16.cc mdarray_int32.cc
mdarray_int64.cc mdarray_size.cc mdarray_ssize.cc
mdarray_bool.cc mdarray_uintptr.cc mdarray_fcomplex.cc
mdarray_dcomplex.cc mdarray_math.cc mdarray_complex.cc
complex.cc xmlparser.cc ctindex.cc ldsrpc.cc sli_funcs.cc
)
set(sllib_HEADERS
asarray.h
asarray_tstring.h
bzstreamio.h
complex_defs.h
complex.h
config.h
cstreamio.h
ctindex.h
digeststreamio.h
ftpstreamio.h
gzstreamio.h
heap_mem.h
httpstreamio.h
inetstreamio.h
ldsrpc.h
mdarray.h
mdarray_bool.h
mdarray_double.h
mdarray_float.h
mdarray_int.h
mdarray_int16.h
mdarray_int32.h
mdarray_int64.h
mdarray_llong.h
mdarray_long.h
mdarray_math.h
mdarray_complex.h
mdarray_short.h
mdarray_size.h
mdarray_ssize.h
mdarray_uchar.h
mdarray_uintptr.h
mdarray_fcomplex.h
mdarray_dcomplex.h
mdarray_statistics.h
numeric_indefs.h
numeric_minmax.h
pipestreamio.h
size_types.h
sli_config.h
sli_eof.h
sli_funcs.h
sli_seek.h
slierr.h
stdstreamio.h
tarray.h
tarray_tstring.h
termlineio.h
termscreenio.h
tregex.h
tstring.h
xmlparser.h
)
if(APPLE)
set(sharedlib_SUFFIX ".dyld")
message(-- Share library suffix = ${sharedlib_SUFFIX})
else(APPLE)
set(sharedlib_SUFFIX ".so")
message(-- Share library suffix = ${sharedlib_SUFFIX})
endif(APPLE)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})
LINK_LIBRARIES(sllib z bz2 readline)
ADD_LIBRARY(sllib SHARED ${sllib_SOURCES})
SET_TARGET_PROPERTIES(sllib PROPERTIES VERSION ${serial} SOVERSION ${soserial})
INSTALL(TARGETS sllib LIBRARY DESTINATION lib)
INSTALL(FILES ${sllib_HEADERS} DESTINATION include/sli)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment