Improve mingw cross-compiling instructions
[libftdi] / ftdi_eeprom / CMakeLists.txt
CommitLineData
a9dddb4d
TJ
1
2option(FTDI_EEPROM "Build ftdi_eeprom" ON)
3
602adb25
MZ
4if ( FTDI_EEPROM )
5 find_package ( Confuse )
438d977e 6 find_package ( Libintl )
602adb25
MZ
7else(FTDI_EEPROM)
8 message(STATUS "ftdi_eeprom build is disabled")
9endif ()
a9dddb4d 10
a9dddb4d 11
602adb25
MZ
12if ( CONFUSE_FOUND )
13 message(STATUS "Building ftdi_eeprom")
ade814a5 14
438d977e 15 include_directories ( ${CONFUSE_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR} )
ade814a5 16
602adb25 17 list ( APPEND libs ${CONFUSE_LIBRARIES} )
ade814a5 18
602adb25
MZ
19 # Version defines
20 set ( EEPROM_MAJOR_VERSION 0 )
21 set ( EEPROM_MINOR_VERSION 17 )
22 set ( EEPROM_VERSION_STRING ${EEPROM_MAJOR_VERSION}.${EEPROM_MINOR_VERSION} )
a9dddb4d 23
602adb25
MZ
24 include_directories ( BEFORE ${CMAKE_SOURCE_DIR}/src )
25 include_directories ( BEFORE ${CMAKE_CURRENT_BINARY_DIR} )
af7a35fe 26
602adb25
MZ
27 configure_file(
28 ftdi_eeprom_version.h.in
29 ${CMAKE_CURRENT_BINARY_DIR}/ftdi_eeprom_version.h
30 )
a9dddb4d 31
602adb25
MZ
32 add_executable ( ftdi_eeprom main.c )
33 target_link_libraries ( ftdi_eeprom ftdi1 )
438d977e
JS
34 target_link_libraries ( ftdi_eeprom ${CONFUSE_LIBRARIES} ${LIBINTL_LIBRARIES} )
35
602adb25
MZ
36 install ( TARGETS ftdi_eeprom DESTINATION bin )
37else ()
38 message ( STATUS "libConfuse not found, won't build ftdi_eeprom" )
39endif ()
a9dddb4d 40