~sergei.glushchenko/+junk/page-scan-hack

« back to all changes in this revision

Viewing changes to src/libarchive/cpio/CMakeLists.txt

merge parallel compression branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
############################################
 
2
#
 
3
# How to build bsdcpio
 
4
#
 
5
############################################
 
6
IF(ENABLE_CPIO)
 
7
 
 
8
  SET(bsdcpio_SOURCES
 
9
    cmdline.c
 
10
    cpio.c
 
11
    cpio.h
 
12
    cpio_platform.h
 
13
    ../libarchive_fe/err.c
 
14
    ../libarchive_fe/err.h
 
15
    ../libarchive_fe/lafe_platform.h
 
16
    ../libarchive_fe/line_reader.c
 
17
    ../libarchive_fe/line_reader.h
 
18
    ../libarchive_fe/matching.c
 
19
    ../libarchive_fe/matching.h
 
20
    ../libarchive_fe/pathmatch.c
 
21
    ../libarchive_fe/pathmatch.h
 
22
  )
 
23
  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libarchive_fe)
 
24
  IF(WIN32 AND NOT CYGWIN)
 
25
    LIST(APPEND bsdcpio_SOURCES cpio_windows.c)
 
26
    LIST(APPEND bsdcpio_SOURCES cpio_windows.h)
 
27
  ENDIF(WIN32 AND NOT CYGWIN)
 
28
 
 
29
  # bsdcpio documentation
 
30
  SET(bsdcpio_MANS bsdcpio.1)
 
31
 
 
32
  # How to build bsdcpio
 
33
  ADD_EXECUTABLE(bsdcpio ${bsdcpio_SOURCES})
 
34
  IF(ENABLE_CPIO_SHARED)
 
35
    TARGET_LINK_LIBRARIES(bsdcpio archive ${ADDITIONAL_LIBS})
 
36
  ELSE(ENABLE_CPIO_SHARED)
 
37
    TARGET_LINK_LIBRARIES(bsdcpio archive_static ${ADDITIONAL_LIBS})
 
38
    SET_TARGET_PROPERTIES(bsdcpio PROPERTIES COMPILE_DEFINITIONS
 
39
                                  LIBARCHIVE_STATIC)
 
40
  ENDIF(ENABLE_CPIO_SHARED)
 
41
  # Full path to the compiled executable (used by test suite)
 
42
  GET_TARGET_PROPERTY(BSDCPIO bsdcpio LOCATION)
 
43
 
 
44
  # Installation rules
 
45
  INSTALL(TARGETS bsdcpio RUNTIME DESTINATION bin)
 
46
  INSTALL_MAN(${bsdcpio_MANS})
 
47
 
 
48
ENDIF(ENABLE_CPIO)
 
49
 
 
50
# Test suite
 
51
add_subdirectory(test)