libftdi Archives

Subject: Re: MSVC build of libftdi git

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 6 Sep 2011 21:10:58 +0800
On Tue, Sep 6, 2011 at 9:04 PM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
> On Mon, Sep 5, 2011 at 11:46 PM, Uwe Bonnes

>> Hello Xiaofan,
>>
>> can you send diffs for your changes? E.g.  I can only crossbuild with
>> mingw32 on Linux, but have no MSVC.
>>
>
> The following diff is against libftdi-1.0 git
> 6eb32553b11d97f4a25825229ee51fedd3f33ee8.
> I think it will be the same for latest git.
>
> The first diff against CMake is probably not the correct solution
> but it is necessary for MinGW, MinGW/MSys and MSVC.
>
> Adding the LIBUSB_CALL is correct for libusb-1.0 git.
>
> Last patch adding GETTIMEOFDAY is probably not the best
> either.

For the libftdi.git, the patches are all CMake related. In order
to build libftdi.git with Cygwin, MinGW, MinGW/MSys and
MSVC, I need the following patches.

The patches are apparently not correct, especially the 2nd
and the 3rd as the patches will break Linux.


diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index d2aeecb..a54f174 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -2,9 +2,9 @@ option(EXAMPLES "Build example programs" ON)

 if (EXAMPLES)
     # Includes
-    include( ${CMAKE_CURRENT_SOURCE_DIR}
-            ${CMAKE_CURRENT_BINARY_DIR}
-            )
+    #include( ${CMAKE_CURRENT_SOURCE_DIR}
+    #        ${CMAKE_CURRENT_BINARY_DIR}
+    #        )

     message(STATUS "Building example programs.")

diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt
index 2f6a7b0..890b4bc 100644
--- a/ftdipp/CMakeLists.txt
+++ b/ftdipp/CMakeLists.txt
@@ -39,24 +39,6 @@ if (FTDIPP)
     target_link_libraries(ftdipp ftdi ${LIBUSB_LIBRARIES} ${BOOST_LIBRARIES})

     # Install
-    if(${UNIX})
-
-    install( TARGETS ftdipp
-                LIBRARY DESTINATION lib${LIB_SUFFIX}
-                COMPONENT sharedlibs
-                )
-
-    install( TARGETS ftdipp-static
-                ARCHIVE DESTINATION lib${LIB_SUFFIX}
-                COMPONENT staticlibs
-                )
-
-    install( FILES ${cpp_headers}
-                DESTINATION include
-                COMPONENT headers
-                )
-
-    endif(${UNIX})

     if(${WIN32})

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4590c58..b029241 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -24,24 +24,6 @@ set_target_properties(ftdi-static PROPERTIES
CLEAN_DIRECT_OUTPUT 1)
 target_link_libraries(ftdi ${LIBUSB_LIBRARIES})

 # Install
-if(${UNIX})
-
-   install( TARGETS ftdi
-            LIBRARY DESTINATION lib${LIB_SUFFIX}
-            COMPONENT sharedlibs
-            )
-
-   install( TARGETS ftdi-static
-            ARCHIVE DESTINATION lib${LIB_SUFFIX}
-            COMPONENT staticlibs
-            )
-
-   install( FILES ${c_headers}
-            DESTINATION include
-            COMPONENT headers
-            )
-
-endif(${UNIX})

 if(${WIN32})


-- 
Xiaofan

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

Current Thread