forked from 981213/spi-nand-prog
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
43 lines (39 loc) · 969 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 3.1)
set(EXE_NAME spi-nand-prog)
project(${EXE_NAME} C)
find_package(PkgConfig)
pkg_check_modules(libusb-1.0 REQUIRED libusb-1.0)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -ggdb -Wall")
include_directories(include ${libusb-1.0_INCLUDEDIR})
set(SPI_MEM_SRCS
spi-mem/spi-mem.c
spi-mem/spi-mem-drvs.c
spi-mem/spi-mem-fx2qspi.c
spi-mem/spi-mem-serprog.c
spi-mem/ch347/ch347.c
spi-mem/ch347/spi-mem.c
)
set(SPI_NAND_SRCS
spi-nand/core.c
spi-nand/gigadevice.c
spi-nand/macronix.c
spi-nand/micron.c
spi-nand/paragon.c
spi-nand/toshiba.c
spi-nand/winbond.c
spi-nand/esmt.c
spi-nand/xtx.c
spi-nand/biwin.c
spi-nand/dosilicon.c
spi-nand/etron.c
spi-nand/fmsh.c
spi-nand/foresee.c
spi-nand/gsto.c
spi-nand/hyf.c
spi-nand/jsc.c
spi-nand/silicongo.c
spi-nand/skyhigh.c
spi-nand/unim.c
)
add_executable(${EXE_NAME} ${SPI_MEM_SRCS} ${SPI_NAND_SRCS} main.c flashops.c)
target_link_libraries(${EXE_NAME} ${libusb-1.0_LIBRARIES})