Fixed libintl use.
authorxantares <xantares09@hotmail.com>
Wed, 14 Aug 2013 18:00:55 +0000 (20:00 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Sep 2013 12:46:52 +0000 (14:46 +0200)
ftdi_eeprom/CMakeLists.txt

index 816e937..6c59e2c 100644 (file)
@@ -12,10 +12,15 @@ endif ()
 if ( CONFUSE_FOUND )
   message(STATUS "Building ftdi_eeprom")
 
-  include_directories ( ${CONFUSE_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR} )
-
+  include_directories ( ${CONFUSE_INCLUDE_DIRS} )
   list ( APPEND libs ${CONFUSE_LIBRARIES} )
+  
+  if ( LIBINTL_FOUND )
+    include_directories ( ${LIBINTL_INCLUDE_DIR} )
+    list ( APPEND libs ${LIBINTL_LIBRARIES} )
+  endif ()
 
+  
   # Version defines
   set ( EEPROM_MAJOR_VERSION 0 )
   set ( EEPROM_MINOR_VERSION 17 )
@@ -30,9 +35,10 @@ if ( CONFUSE_FOUND )
   )
 
   add_executable ( ftdi_eeprom main.c )
-  target_link_libraries ( ftdi_eeprom ftdi1 )
-  target_link_libraries ( ftdi_eeprom ${CONFUSE_LIBRARIES} ${LIBINTL_LIBRARIES} )
-  
+  target_link_libraries ( ftdi_eeprom ftdi1 ${CONFUSE_LIBRARIES} )
+  if ( LIBINTL_FOUND )
+    target_link_libraries ( ftdi_eeprom ${LIBINTL_LIBRARIES} )
+  endif ()
   install ( TARGETS ftdi_eeprom DESTINATION bin )
 else ()
   message ( STATUS "libConfuse not found, won't build ftdi_eeprom" )