CMakeLists.txt 1.4 KB
Newer Older
1
SET(libaec_SRCS encode.c encode_accessors.c decode.c)
2
ADD_LIBRARY(aec ${LIB_TYPE} ${libaec_SRCS})
3
SET_TARGET_PROPERTIES(aec PROPERTIES
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
4
  SOVERSION 0.0.5
5
  )
6
ADD_LIBRARY(sz ${LIB_TYPE} sz_compat.c)
7
SET_TARGET_PROPERTIES(sz PROPERTIES
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
8
  SOVERSION 2.0.1
9
  )
10

11
TARGET_LINK_LIBRARIES(sz aec)
12 13 14
IF(WIN32 AND BUILD_SHARED_LIBS)
  SET_TARGET_PROPERTIES (aec PROPERTIES DEFINE_SYMBOL "AECDLL_EXPORTS")
  SET_TARGET_PROPERTIES (sz PROPERTIES DEFINE_SYMBOL "AECDLL_EXPORTS")
15
  SET_TARGET_PROPERTIES(sz PROPERTIES OUTPUT_NAME "szip")
16
ENDIF(WIN32 AND BUILD_SHARED_LIBS)
17

18 19 20
ADD_EXECUTABLE(aec_client aec.c)
SET_TARGET_PROPERTIES(aec_client PROPERTIES OUTPUT_NAME "aec")
TARGET_LINK_LIBRARIES(aec_client aec)
21

22 23
IF(UNIX)
  ADD_EXECUTABLE(utime EXCLUDE_FROM_ALL utime.c)
24 25 26 27 28
  ADD_CUSTOM_TARGET(bench
    COMMAND ${CMAKE_SOURCE_DIR}/src/benc.sh ${CMAKE_SOURCE_DIR}/data/typical.rz
    COMMAND ${CMAKE_SOURCE_DIR}/src/bdec.sh
    DEPENDS aec_client utime
    )
29
ENDIF(UNIX)
30

Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
IF(WIN32)
  INSTALL(TARGETS aec sz
    RUNTIME
    DESTINATION bin
    ARCHIVE
    DESTINATION lib
    COMPONENT libraries
    )
ELSE(WIN32)
  INSTALL(TARGETS aec sz
    LIBRARY
    DESTINATION lib
    ARCHIVE
    DESTINATION lib
    COMPONENT libraries
    )
ENDIF(WIN32)
48 49 50 51
INSTALL(FILES libaec.h szlib.h
  DESTINATION include
  COMPONENT headers
  )
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
52 53 54 55
INSTALL(TARGETS aec_client
  RUNTIME
  DESTINATION bin
  COMPONENT applications
56
  )
57

Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
58
SET(CPACK_COMPONENTS_ALL applications libraries headers)