CMakeLists.txt 1.27 KB
Newer Older
1
SET(libaec_SRCS encode.c encode_accessors.c decode.c)
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
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.2
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
5
  )
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
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.2
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
9
  )
10

Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
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)
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
21

22 23 24
IF(UNIX)
  ADD_EXECUTABLE(utime EXCLUDE_FROM_ALL utime.c)
ENDIF(UNIX)
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
25

26
INSTALL(FILES libaec.h szlib.h DESTINATION include)
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
27 28 29 30 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)
INSTALL(TARGETS aec_client
  RUNTIME
  DESTINATION bin
  COMPONENT applications
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
48
  )
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
49 50 51 52 53
INSTALL(FILES libaec.h szlib.h
  DESTINATION include
  COMPONENT headers
  )
SET(CPACK_COMPONENTS_ALL applications libraries headers)