Commit | Line | Data |
---|---|---|
0b2d00fc MV |
1 | # Includes |
2 | include_directories( ${CMAKE_CURRENT_BINARY_DIR} | |
3 | ${CMAKE_CURRENT_SOURCE_DIR} | |
4 | ) | |
5 | ||
6 | # Targets | |
7 | set(c_sources ftdi.c) | |
8 | set(c_headers ftdi.h) | |
9 | ||
10 | add_library(ftdi SHARED ${c_sources}) | |
11 | ||
12 | # Dependencies | |
13 | target_link_libraries(ftdi usb) | |
14 | ||
15 | # Install | |
16 | if(${UNIX}) | |
17 | ||
18 | install( TARGETS ftdi | |
19 | LIBRARY DESTINATION lib | |
20 | COMPONENT sharedlibs | |
21 | ) | |
22 | ||
23 | install( FILES ${c_headers} | |
24 | DESTINATION include/${PROJECT_NAME} | |
25 | COMPONENT headers | |
26 | ) | |
27 | ||
28 | endif(${UNIX}) | |
29 | ||
30 | if(${WIN32}) | |
31 | ||
32 | install( TARGETS ftdi | |
33 | DESTINATION bin | |
34 | COMPONENT sharedlibs | |
35 | ) | |
36 | ||
37 | install( FILES ${c_headers} | |
38 | DESTINATION include/${PROJECT_NAME} | |
39 | COMPONENT headers | |
40 | ) | |
41 | ||
42 | endif(${WIN32}) |