[CMAKE]
[reactos.git] / lib / 3rdparty / bzip2 / CMakeLists.txt
1 add_definitions(-DBZ_NO_STDIO -DBZ_DECOMPRESS_ONLY)
2
3 spec2def(bzip2 ${CMAKE_CURRENT_SOURCE_DIR}/unbzip2.spec ${CMAKE_CURRENT_BINARY_DIR}/unbzip2.def)
4
5 list(APPEND SOURCE
6 bzlib.c
7 randtable.c
8 crctable.c
9 decompress.c
10 huffman.c
11 dllmain.c)
12
13 add_library(bzip2 SHARED ${SOURCE})
14
15 set_target_properties(bzip2 PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--subsystem,native" OUTPUT_NAME "unbzip2")
16
17 target_link_libraries(bzip2 ${CMAKE_CURRENT_BINARY_DIR}/unbzip2.def)
18
19 add_importlibs(bzip2 ntoskrnl)
20
21 add_dependencies(bzip2 bzip2_def bugcodes)