libftdi-git Archives

Subject: A library to talk to FTDI chips branch, master, updated. v1.0-32-gc2219c8

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 2 Sep 2013 14:49:57 +0200 (CEST)
The branch, master has been updated
       via  c2219c82ecb5731775fecec7f5348d62f578355b (commit)
       via  1ae0293e7aa959236d3a955c1af1a79e925a902a (commit)
       via  7a6dfcaa1bbd52d4fec9791658d29d07cec82df8 (commit)
       via  016ad174031f03588b526ba873c6e14343199dab (commit)
       via  6d4f7fbac8e34f674ce9b4c82492af2bed014541 (commit)
       via  e043da425fc1bec54935a77e8013b1c75d13624f (commit)
      from  6b27ee499a94eca246ef2899474eea87c505cf68 (commit)


- Log -----------------------------------------------------------------
commit c2219c82ecb5731775fecec7f5348d62f578355b
Author: xantares <xantares09@xxxxxxxxxxx>
Date:   Thu Aug 15 09:45:22 2013 +0200

    Cleaned static-lib cmake doc.

commit 1ae0293e7aa959236d3a955c1af1a79e925a902a
Author: xantares <xantares09@xxxxxxxxxxx>
Date:   Wed Aug 14 21:06:11 2013 +0200

    Also move LibFTDI1Config to /cmake

commit 7a6dfcaa1bbd52d4fec9791658d29d07cec82df8
Author: xantares <xantares09@xxxxxxxxxxx>
Date:   Wed Aug 14 20:41:28 2013 +0200

    Guess libdir for archlinux.

commit 016ad174031f03588b526ba873c6e14343199dab
Author: xantares <xantares09@xxxxxxxxxxx>
Date:   Wed Aug 14 20:23:08 2013 +0200

    Added mingw-w64 toolchain files

commit 6d4f7fbac8e34f674ce9b4c82492af2bed014541
Author: xantares <xantares09@xxxxxxxxxxx>
Date:   Wed Aug 14 20:13:19 2013 +0200

    Fixed installation of static libraries with windows.

commit e043da425fc1bec54935a77e8013b1c75d13624f
Author: xantares <xantares09@xxxxxxxxxxx>
Date:   Wed Aug 14 20:00:55 2013 +0200

    Fixed libintl use.

-----------------------------------------------------------------------

Summary of changes:
 CMakeLists.txt                           |    9 ++-
 LibFTDI1Config.cmake.in                  |   51 -----------
 Toolchain-Crossbuild32.cmake             |    4 -
 Toolchain-mingw32.cmake                  |   16 ----
 UseLibFTDI1.cmake                        |   18 ----
 cmake/LibFTDI1Config.cmake.in            |   51 +++++++++++
 cmake/Toolchain-Crossbuild32.cmake       |    4 +
 cmake/Toolchain-i686-w64-mingw32.cmake   |   17 ++++
 cmake/Toolchain-mingw32.cmake            |   16 ++++
 cmake/Toolchain-x86_64-w64-mingw32.cmake |   17 ++++
 cmake/UseLibFTDI1.cmake                  |   18 ++++
 ftdi_eeprom/CMakeLists.txt               |   16 +++-
 ftdipp/CMakeLists.txt                    |  138 +++++++++++++-----------------
 src/CMakeLists.txt                       |   80 ++++++------------
 14 files changed, 223 insertions(+), 232 deletions(-)
 delete mode 100644 LibFTDI1Config.cmake.in
 delete mode 100644 Toolchain-Crossbuild32.cmake
 delete mode 100644 Toolchain-mingw32.cmake
 delete mode 100644 UseLibFTDI1.cmake
 create mode 100644 cmake/LibFTDI1Config.cmake.in
 create mode 100644 cmake/Toolchain-Crossbuild32.cmake
 create mode 100644 cmake/Toolchain-i686-w64-mingw32.cmake
 create mode 100644 cmake/Toolchain-mingw32.cmake
 create mode 100644 cmake/Toolchain-x86_64-w64-mingw32.cmake
 create mode 100644 cmake/UseLibFTDI1.cmake

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c7a6a5..c9e4236 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,7 +50,10 @@ option ( STATICLIBS "Build static libraries" ON )
 
 # guess LIB_SUFFIX, don't take debian multiarch into account 
 if ( NOT DEFINED LIB_SUFFIX )
-  if ( CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CROSSCOMPILING AND NOT 
EXISTS "/etc/debian_version" )
+  if( CMAKE_SYSTEM_NAME MATCHES "Linux"
+      AND NOT CMAKE_CROSSCOMPILING
+      AND NOT EXISTS "/etc/debian_version"
+      AND NOT EXISTS "/etc/arch-release" )
     if ( "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" )
       set ( LIB_SUFFIX 64 )
     endif ()
@@ -195,8 +198,8 @@ if ( UNIX )
   set ( LIBFTDI_VERSION_MINOR ${MINOR_VERSION} )
   
   set ( LIBFTDI_USE_FILE 
${CMAKE_INSTALL_PREFIX}/${LIBFTDI_CMAKE_CONFIG_DIR}/UseLibFTDI1.cmake )
-  configure_file ( LibFTDI1Config.cmake.in 
${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake @ONLY )
-  install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake 
UseLibFTDI1.cmake
+  configure_file ( cmake/LibFTDI1Config.cmake.in 
${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake @ONLY )
+  install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake 
cmake/UseLibFTDI1.cmake
             DESTINATION ${LIBFTDI_CMAKE_CONFIG_DIR}
           )
 endif ()
diff --git a/LibFTDI1Config.cmake.in b/LibFTDI1Config.cmake.in
deleted file mode 100644
index 6146bc0..0000000
--- a/LibFTDI1Config.cmake.in
+++ /dev/null
@@ -1,51 +0,0 @@
-#                                               -*- cmake -*-
-#
-#  LibFTDI1Config.cmake(.in)
-#
-#  Copyright (C) 2013 Intra2net AG and the libftdi developers
-#
-#  This file is part of LibFTDI.
-#
-#  LibFTDI is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU Lesser General Public License
-#  version 2.1 as published by the Free Software Foundation;
-#
-
-# Use the following variables to compile and link against LibFTDI:
-#  LIBFTDI_FOUND              - True if LibFTDI was found on your system
-#  LIBFTDI_USE_FILE           - The file making LibFTDI usable
-#  LIBFTDI_DEFINITIONS        - Definitions needed to build with LibFTDI
-#  LIBFTDI_INCLUDE_DIRS       - Directory where OT.hxx can be found
-#  LIBFTDI_INCLUDE_DIRS       - List of directories of LibFTDI and it's 
dependencies
-#  LIBFTDI_LIBRARY            - LibFTDI library location
-#  LIBFTDI_LIBRARIES          - List of libraries to link against LibFTDI 
library
-#  LIBFTDIPP_LIBRARY          - LibFTDI C++ wrapper library location
-#  LIBFTDIPP_LIBRARIES        - List of libraries to link against LibFTDI C++ 
wrapper
-#  LIBFTDI_LIBRARY_DIRS       - List of directories containing LibFTDI' 
libraries
-#  LIBFTDI_ROOT_DIR           - The base directory of LibFTDI
-#  LIBFTDI_VERSION_STRING     - A human-readable string containing the version
-#  LIBFTDI_VERSION_MAJOR      - The major version of LibFTDI
-#  LIBFTDI_VERSION_MINOR      - The minor version of LibFTDI
-#  LIBFTDI_VERSION_PATCH      - The patch version of LibFTDI
-#  LIBFTDI_PYTHON_MODULE_PATH - Path to the python module
-
-set ( LIBFTDI_FOUND 1 )
-set ( LIBFTDI_USE_FILE     "@LIBFTDI_USE_FILE@" )
-
-set ( LIBFTDI_DEFINITIONS  "@LIBFTDI_DEFINITIONS@" )
-set ( LIBFTDI_INCLUDE_DIR  "@LIBFTDI_INCLUDE_DIR@" )
-set ( LIBFTDI_INCLUDE_DIRS "@LIBFTDI_INCLUDE_DIRS@" )
-set ( LIBFTDI_LIBRARY      "@LIBFTDI_LIBRARY@" )
-set ( LIBFTDI_LIBRARIES    "@LIBFTDI_LIBRARIES@" )
-set ( LIBFTDIPP_LIBRARY    "@LIBFTDIPP_LIBRARY@" )
-set ( LIBFTDIPP_LIBRARIES  "@LIBFTDIPP_LIBRARIES@" )
-set ( LIBFTDI_LIBRARY_DIRS "@LIBFTDI_LIBRARY_DIRS@" )
-set ( LIBFTDI_ROOT_DIR     "@LIBFTDI_ROOT_DIR@" )
-
-set ( LIBFTDI_VERSION_STRING "@LIBFTDI_VERSION_STRING@" )
-set ( LIBFTDI_VERSION_MAJOR  "@LIBFTDI_VERSION_MAJOR@" )
-set ( LIBFTDI_VERSION_MINOR  "@LIBFTDI_VERSION_MINOR@" )
-set ( LIBFTDI_VERSION_PATCH  "@LIBFTDI_VERSION_PATCH@" )
-
-set ( LIBFTDI_PYTHON_MODULE_PATH "@LIBFTDI_PYTHON_MODULE_PATH@" )
-
diff --git a/Toolchain-Crossbuild32.cmake b/Toolchain-Crossbuild32.cmake
deleted file mode 100644
index 3c80dd8..0000000
--- a/Toolchain-Crossbuild32.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-set(CMAKE_SYSTEM_NAME Linux)
-set(CMAKE_C_COMPILER gcc -m32)
-set(CMAKE_CXX_COMPILER g++ -m32)
-set(CMAKE_FIND_ROOT_PATH /usr/lib)
diff --git a/Toolchain-mingw32.cmake b/Toolchain-mingw32.cmake
deleted file mode 100644
index bff3cba..0000000
--- a/Toolchain-mingw32.cmake
+++ /dev/null
@@ -1,16 +0,0 @@
-# the name of the target operating system
-SET(CMAKE_SYSTEM_NAME Windows)
-
-# which compilers to use for C and C++
-SET(CMAKE_C_COMPILER i386-mingw32msvc-gcc)
-SET(CMAKE_CXX_COMPILER i386-mingw32msvc-g++)
-
-# here is the target environment located
-SET(CMAKE_FIND_ROOT_PATH  /opt/cross/i386-mingw32msvc )
-
-# adjust the default behaviour of the FIND_XXX() commands:
-# search headers and libraries in the target environment, search 
-# programs in the host environment
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
diff --git a/UseLibFTDI1.cmake b/UseLibFTDI1.cmake
deleted file mode 100644
index e7e43b0..0000000
--- a/UseLibFTDI1.cmake
+++ /dev/null
@@ -1,18 +0,0 @@
-#                                               -*- cmake -*-
-#
-#  UseLibFTDI.cmake
-#
-#  Copyright (C) 2013 Intra2net AG and the libftdi developers
-#
-#  This file is part of LibFTDI.
-#
-#  LibFTDI is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU Lesser General Public License
-#  version 2.1 as published by the Free Software Foundation;
-#
-
-
-add_definitions     ( ${LIBFTDI_DEFINITIONS} )
-include_directories ( ${LIBFTDI_INCLUDE_DIRS} )
-link_directories    ( ${LIBFTDI_LIBRARY_DIRS} )
-
diff --git a/cmake/LibFTDI1Config.cmake.in b/cmake/LibFTDI1Config.cmake.in
new file mode 100644
index 0000000..6146bc0
--- /dev/null
+++ b/cmake/LibFTDI1Config.cmake.in
@@ -0,0 +1,51 @@
+#                                               -*- cmake -*-
+#
+#  LibFTDI1Config.cmake(.in)
+#
+#  Copyright (C) 2013 Intra2net AG and the libftdi developers
+#
+#  This file is part of LibFTDI.
+#
+#  LibFTDI is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU Lesser General Public License
+#  version 2.1 as published by the Free Software Foundation;
+#
+
+# Use the following variables to compile and link against LibFTDI:
+#  LIBFTDI_FOUND              - True if LibFTDI was found on your system
+#  LIBFTDI_USE_FILE           - The file making LibFTDI usable
+#  LIBFTDI_DEFINITIONS        - Definitions needed to build with LibFTDI
+#  LIBFTDI_INCLUDE_DIRS       - Directory where OT.hxx can be found
+#  LIBFTDI_INCLUDE_DIRS       - List of directories of LibFTDI and it's 
dependencies
+#  LIBFTDI_LIBRARY            - LibFTDI library location
+#  LIBFTDI_LIBRARIES          - List of libraries to link against LibFTDI 
library
+#  LIBFTDIPP_LIBRARY          - LibFTDI C++ wrapper library location
+#  LIBFTDIPP_LIBRARIES        - List of libraries to link against LibFTDI C++ 
wrapper
+#  LIBFTDI_LIBRARY_DIRS       - List of directories containing LibFTDI' 
libraries
+#  LIBFTDI_ROOT_DIR           - The base directory of LibFTDI
+#  LIBFTDI_VERSION_STRING     - A human-readable string containing the version
+#  LIBFTDI_VERSION_MAJOR      - The major version of LibFTDI
+#  LIBFTDI_VERSION_MINOR      - The minor version of LibFTDI
+#  LIBFTDI_VERSION_PATCH      - The patch version of LibFTDI
+#  LIBFTDI_PYTHON_MODULE_PATH - Path to the python module
+
+set ( LIBFTDI_FOUND 1 )
+set ( LIBFTDI_USE_FILE     "@LIBFTDI_USE_FILE@" )
+
+set ( LIBFTDI_DEFINITIONS  "@LIBFTDI_DEFINITIONS@" )
+set ( LIBFTDI_INCLUDE_DIR  "@LIBFTDI_INCLUDE_DIR@" )
+set ( LIBFTDI_INCLUDE_DIRS "@LIBFTDI_INCLUDE_DIRS@" )
+set ( LIBFTDI_LIBRARY      "@LIBFTDI_LIBRARY@" )
+set ( LIBFTDI_LIBRARIES    "@LIBFTDI_LIBRARIES@" )
+set ( LIBFTDIPP_LIBRARY    "@LIBFTDIPP_LIBRARY@" )
+set ( LIBFTDIPP_LIBRARIES  "@LIBFTDIPP_LIBRARIES@" )
+set ( LIBFTDI_LIBRARY_DIRS "@LIBFTDI_LIBRARY_DIRS@" )
+set ( LIBFTDI_ROOT_DIR     "@LIBFTDI_ROOT_DIR@" )
+
+set ( LIBFTDI_VERSION_STRING "@LIBFTDI_VERSION_STRING@" )
+set ( LIBFTDI_VERSION_MAJOR  "@LIBFTDI_VERSION_MAJOR@" )
+set ( LIBFTDI_VERSION_MINOR  "@LIBFTDI_VERSION_MINOR@" )
+set ( LIBFTDI_VERSION_PATCH  "@LIBFTDI_VERSION_PATCH@" )
+
+set ( LIBFTDI_PYTHON_MODULE_PATH "@LIBFTDI_PYTHON_MODULE_PATH@" )
+
diff --git a/cmake/Toolchain-Crossbuild32.cmake 
b/cmake/Toolchain-Crossbuild32.cmake
new file mode 100644
index 0000000..3c80dd8
--- /dev/null
+++ b/cmake/Toolchain-Crossbuild32.cmake
@@ -0,0 +1,4 @@
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_C_COMPILER gcc -m32)
+set(CMAKE_CXX_COMPILER g++ -m32)
+set(CMAKE_FIND_ROOT_PATH /usr/lib)
diff --git a/cmake/Toolchain-i686-w64-mingw32.cmake 
b/cmake/Toolchain-i686-w64-mingw32.cmake
new file mode 100644
index 0000000..1eed0cf
--- /dev/null
+++ b/cmake/Toolchain-i686-w64-mingw32.cmake
@@ -0,0 +1,17 @@
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# which compilers to use for C and C++
+SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
+SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
+
+# here is the target environment located
+SET(CMAKE_FIND_ROOT_PATH  /usr/i686-w64-mingw32 )
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search 
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set (CMAKE_RC_COMPILER i686-w64-mingw32-windres)
diff --git a/cmake/Toolchain-mingw32.cmake b/cmake/Toolchain-mingw32.cmake
new file mode 100644
index 0000000..bff3cba
--- /dev/null
+++ b/cmake/Toolchain-mingw32.cmake
@@ -0,0 +1,16 @@
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# which compilers to use for C and C++
+SET(CMAKE_C_COMPILER i386-mingw32msvc-gcc)
+SET(CMAKE_CXX_COMPILER i386-mingw32msvc-g++)
+
+# here is the target environment located
+SET(CMAKE_FIND_ROOT_PATH  /opt/cross/i386-mingw32msvc )
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search 
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
diff --git a/cmake/Toolchain-x86_64-w64-mingw32.cmake 
b/cmake/Toolchain-x86_64-w64-mingw32.cmake
new file mode 100644
index 0000000..20a5b40
--- /dev/null
+++ b/cmake/Toolchain-x86_64-w64-mingw32.cmake
@@ -0,0 +1,17 @@
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# which compilers to use for C and C++
+SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
+SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
+
+# here is the target environment located
+SET(CMAKE_FIND_ROOT_PATH  /usr/x86_64-w64-mingw32 )
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search 
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set (CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
diff --git a/cmake/UseLibFTDI1.cmake b/cmake/UseLibFTDI1.cmake
new file mode 100644
index 0000000..e7e43b0
--- /dev/null
+++ b/cmake/UseLibFTDI1.cmake
@@ -0,0 +1,18 @@
+#                                               -*- cmake -*-
+#
+#  UseLibFTDI.cmake
+#
+#  Copyright (C) 2013 Intra2net AG and the libftdi developers
+#
+#  This file is part of LibFTDI.
+#
+#  LibFTDI is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU Lesser General Public License
+#  version 2.1 as published by the Free Software Foundation;
+#
+
+
+add_definitions     ( ${LIBFTDI_DEFINITIONS} )
+include_directories ( ${LIBFTDI_INCLUDE_DIRS} )
+link_directories    ( ${LIBFTDI_LIBRARY_DIRS} )
+
diff --git a/ftdi_eeprom/CMakeLists.txt b/ftdi_eeprom/CMakeLists.txt
index 816e937..6c59e2c 100644
--- a/ftdi_eeprom/CMakeLists.txt
+++ b/ftdi_eeprom/CMakeLists.txt
@@ -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" )
diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt
index d3a22ce..7500211 100644
--- a/ftdipp/CMakeLists.txt
+++ b/ftdipp/CMakeLists.txt
@@ -1,7 +1,7 @@
 # Check
 set(FTDI_BUILD_CPP False PARENT_SCOPE)
 
-option(FTDIPP "Build C++ binding library libftdi1++" ON)
+option ( FTDIPP "Build C++ binding library libftdi1++" ON )
 
 # Targets
 set(cpp_sources   ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.cpp CACHE INTERNAL "List of 
cpp sources" )
@@ -9,82 +9,60 @@ set(cpp_headers   ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.hpp CACHE 
INTERNAL "List of c
         
 if (FTDIPP)
 
-    if(Boost_FOUND)
-
-        # Includes
-        include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}
-                            ${CMAKE_CURRENT_SOURCE_DIR}
-                            ${CMAKE_SOURCE_DIR}/src)
-
-        include_directories(${Boost_INCLUDE_DIRS})
-
-
-
-        set(FTDI_BUILD_CPP True PARENT_SCOPE)
-        message(STATUS "Building libftdi1++")
-
-        # Shared library
-        add_library(ftdipp1 SHARED ${cpp_sources})
-
-        math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1")    # Compatiblity with 
previous releases
-        set_target_properties(ftdipp1 PROPERTIES VERSION 
${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
-
-        # Static library
-        if (STATICLIBS)
-            add_library(ftdipp1-static STATIC ${cpp_sources})
-            set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME 
"ftdipp1")
-        endif (STATICLIBS)
-
-        # Prevent clobbering each other during the build
-        set_target_properties(ftdipp1 PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-        if (STATICLIBS)
-            set_target_properties(ftdipp1-static PROPERTIES 
CLEAN_DIRECT_OUTPUT 1)
-        endif (STATICLIBS)
-
-        # Dependencies
-        target_link_libraries(ftdipp1 ftdi1 ${LIBUSB_LIBRARIES} 
${BOOST_LIBRARIES})
-
-        # Install
-        if(${UNIX})
-            install( TARGETS ftdipp1
-                        LIBRARY DESTINATION lib${LIB_SUFFIX}
-                        COMPONENT sharedlibs
-                        )
-            if (STATICLIBS)
-                install( TARGETS ftdipp1-static
-                            ARCHIVE DESTINATION lib${LIB_SUFFIX}
-                            COMPONENT staticlibs
-                            )
-            endif (STATICLIBS)
-            install( FILES ${cpp_headers}
-                        DESTINATION include/${PROJECT_NAME}
-                        COMPONENT headers
-                        )
-        endif(${UNIX})
-
-        if(${WIN32})
-            install( TARGETS ftdipp1
-                        DESTINATION bin
-                        COMPONENT sharedlibs
-                        )
-            if (STATICLIBS)
-                install( TARGETS ftdipp1-static
-                            DESTINATION bin
-                            COMPONENT staticlibs
-                            )
-            endif (STATICLIBS)
-            install( FILES ${cpp_headers}
-                        DESTINATION include/${PROJECT_NAME}
-                        COMPONENT headers
-                        )
-        endif(${WIN32})
-
-    else(Boost_FOUND)
-        message(STATUS "Boost not found, won't build libftdi1++")
-    endif(Boost_FOUND)
-
-else(FTDIPP)
-
-    message(STATUS "Not building libftdi1++")
-
-endif(FTDIPP)
+  if(Boost_FOUND)
+
+    # Includes
+    include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}
+                        ${CMAKE_CURRENT_SOURCE_DIR}
+                        ${CMAKE_SOURCE_DIR}/src)
+
+    include_directories(${Boost_INCLUDE_DIRS})
+
+
+
+    set(FTDI_BUILD_CPP True PARENT_SCOPE)
+    message(STATUS "Building libftdi1++")
+
+    # Shared library
+    add_library(ftdipp1 SHARED ${cpp_sources})
+
+    math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1")    # Compatiblity with 
previous releases
+    set_target_properties(ftdipp1 PROPERTIES VERSION 
${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
+
+    # Prevent clobbering each other during the build
+    set_target_properties(ftdipp1 PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+
+    # Dependencies
+    target_link_libraries(ftdipp1 ftdi1 ${LIBUSB_LIBRARIES} ${BOOST_LIBRARIES})
+
+    
+    install ( TARGETS ftdipp1
+              RUNTIME DESTINATION bin
+              LIBRARY DESTINATION lib${LIB_SUFFIX}
+              ARCHIVE DESTINATION lib${LIB_SUFFIX}
+            )
+            
+    # Static library
+    if ( STATICLIBS )
+      add_library(ftdipp1-static STATIC ${cpp_sources})
+      set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME "ftdipp1")
+      set_target_properties(ftdipp1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+
+      install ( TARGETS ftdipp1-static
+                ARCHIVE DESTINATION lib${LIB_SUFFIX}
+                COMPONENT staticlibs
+              )
+    endif ()
+
+    install ( FILES ${cpp_headers}
+              DESTINATION include/${PROJECT_NAME}
+              COMPONENT headers
+            )
+
+  else ()
+    message(STATUS "Boost not found, won't build libftdi1++")
+  endif ()
+
+else ()
+  message(STATUS "Not building libftdi1++")
+endif ()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d67caba..9fd86a6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -11,8 +11,8 @@ execute_process(COMMAND git describe
                 OUTPUT_STRIP_TRAILING_WHITESPACE
                 )
 if(${GIT_DESCRIBE_RESULT} STREQUAL 0)
-    set(SNAPSHOT_VERSION ${GIT_DESCRIBE_OUTPUT})
-endif(${GIT_DESCRIBE_RESULT} STREQUAL 0)
+  set(SNAPSHOT_VERSION ${GIT_DESCRIBE_OUTPUT})
+endif ()
 message(STATUS "Detected git snapshot version: ${SNAPSHOT_VERSION}")
 
 configure_file(ftdi_version_i.h.in 
"${CMAKE_CURRENT_BINARY_DIR}/ftdi_version_i.h" @ONLY)
@@ -25,61 +25,31 @@ add_library(ftdi1 SHARED ${c_sources})
 
 math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1")    # Compatiblity with 
previous releases
 set_target_properties(ftdi1 PROPERTIES VERSION 
${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
-
-# Static library
-add_library(ftdi1-static STATIC ${c_sources})
-if (STATICLIBS)
-    set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1")
-endif (STATICLIBS)
-
 # Prevent clobbering each other during the build
-set_target_properties(ftdi1 PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-if (STATICLIBS)
-    set_target_properties(ftdi1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-endif (STATICLIBS)
+set_target_properties ( ftdi1 PROPERTIES CLEAN_DIRECT_OUTPUT 1 )
+
 
 # Dependencies
 target_link_libraries(ftdi1 ${LIBUSB_LIBRARIES})
 
-# Install
-if(${UNIX})
-
-   install( TARGETS ftdi1
-            LIBRARY DESTINATION lib${LIB_SUFFIX}
-            COMPONENT sharedlibs
-            )
-
-   if (STATICLIBS)
-       install( TARGETS ftdi1-static
-                ARCHIVE DESTINATION lib${LIB_SUFFIX}
-                COMPONENT staticlibs
-                )
-   endif (STATICLIBS)
-
-   install( FILES ${c_headers}
-            DESTINATION include/${PROJECT_NAME}
-            COMPONENT headers
-            )
-
-endif(${UNIX})
-
-if(${WIN32})
-
-   install( TARGETS ftdi1
-            DESTINATION bin
-            COMPONENT sharedlibs
-            )
-
-   if (STATICLIBS)
-       install( TARGETS ftdi1-static
-                DESTINATION bin
-                COMPONENT staticlibs
-                )
-   endif (STATICLIBS)
-
-   install( FILES ${c_headers}
-            DESTINATION include/${PROJECT_NAME}
-            COMPONENT headers
-            )
-
-endif(${WIN32})
+install ( TARGETS ftdi1
+          RUNTIME DESTINATION bin
+          LIBRARY DESTINATION lib${LIB_SUFFIX}
+          ARCHIVE DESTINATION lib${LIB_SUFFIX}
+        )
+
+if ( STATICLIBS )
+  add_library(ftdi1-static STATIC ${c_sources})
+  target_link_libraries(ftdi1-static ${LIBUSB_LIBRARIES})
+  set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1")
+  set_target_properties(ftdi1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+  install ( TARGETS ftdi1-static
+            ARCHIVE DESTINATION lib${LIB_SUFFIX}
+            COMPONENT staticlibs
+          )
+endif ()
+
+install ( FILES ${c_headers}
+          DESTINATION include/${PROJECT_NAME}
+          COMPONENT headers
+        )


hooks/post-receive
-- 
A library to talk to FTDI chips

--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread
  • A library to talk to FTDI chips branch, master, updated. v1.0-32-gc2219c8, libftdi-git <=