libftdi-git Archives

Subject: A library to talk to FTDI chips branch, master, updated. v1.5-38-ge7f734f

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 10 Oct 2023 16:57:35 +0200 (CEST)
The branch, master has been updated
       via  e7f734f82c69aea10f1f9bde57f228339fcb56f3 (commit)
       via  09203ccd2a8798ed246c6075be6ffe56c38be16a (commit)
       via  bc05652f65d4d5415d58e29ff525ddc7c8c1c8dd (commit)
       via  161caf3db4e2ff1c18328c0f628614987e50ffcc (commit)
       via  3dc444f99bbc780f06ee6115c086e30f2dda471a (commit)
       via  e5136ce5407ceffd388f69c1582a6b0d6167f61d (commit)
      from  91d2d1f1be6615a02f8d2ac0b90607fb7a3dd770 (commit)


- Log -----------------------------------------------------------------
commit e7f734f82c69aea10f1f9bde57f228339fcb56f3
Author: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
Date:   Mon Sep 11 10:04:04 2023 +0200

    CMake: make the project compatible with building as a subproject
    
    Use CMAKE_CURRENT_*_DIR in the main CMakeLists.txt and PROJECT_*_DIR
    in the subdirectories.

commit 09203ccd2a8798ed246c6075be6ffe56c38be16a
Author: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
Date:   Mon Sep 11 10:04:03 2023 +0200

    ftdipp/CMakeLists.txt: remove VIM modline settings
    
    Indentation settings will be handled via the EditorConfig project.

commit bc05652f65d4d5415d58e29ff525ddc7c8c1c8dd
Author: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
Date:   Mon Sep 11 10:04:02 2023 +0200

    CMake: rework subdirectory handling
    
    Move all mandatory subdirs to the top and also make if clauses more
    readable.

commit 161caf3db4e2ff1c18328c0f628614987e50ffcc
Author: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
Date:   Mon Sep 11 10:04:01 2023 +0200

    CMake: rework findlibusb module
    
    Rename the module to FindLibUSB.cmake and use it as the only way
    of finding libusb.
    
    Bonus: perform CMake linting of the module.

commit 3dc444f99bbc780f06ee6115c086e30f2dda471a
Author: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
Date:   Mon Sep 11 10:04:00 2023 +0200

    CMake: report CMake version

commit e5136ce5407ceffd388f69c1582a6b0d6167f61d
Author: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
Date:   Mon Sep 11 10:03:59 2023 +0200

    CMake: use dedicated recipe for documentation generation
    
    Use PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR to refer to the top
    source directory.

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

Summary of changes:
 CMakeLists.txt             |   73 +++++++++++++++----------------------------
 cmake/FindLibUSB.cmake     |   38 +++++++++++++++++++++++
 cmake/FindUSB1.cmake       |   37 ----------------------
 doc/CMakeLists.txt         |   26 +++++++++++++++
 doc/Doxyfile.in            |    8 ++--
 doc/Doxyfile.xml.in        |    2 +-
 examples/CMakeLists.txt    |    4 +-
 ftdi_eeprom/CMakeLists.txt |    2 +-
 ftdipp/CMakeLists.txt      |    4 +--
 python/CMakeLists.txt      |   24 ++++++++------
 test/CMakeLists.txt        |    2 +-
 11 files changed, 114 insertions(+), 106 deletions(-)
 create mode 100644 cmake/FindLibUSB.cmake
 delete mode 100644 cmake/FindUSB1.cmake
 create mode 100644 doc/CMakeLists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f36912d..6284c8d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,7 @@
 cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
 
+message(STATUS "CMake version: ${CMAKE_VERSION}")
+
 # Project
 project(libftdi1 C)
 set(MAJOR_VERSION 1)
@@ -7,7 +9,7 @@ set(MINOR_VERSION 5)
 set(PACKAGE libftdi1)
 set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION})
 set(VERSION ${VERSION_STRING})
-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
 
 # Support new if() IN_LIST operator
 if(POLICY CMP0057)
@@ -42,17 +44,9 @@ if(${CMAKE_BUILD_TYPE} STREQUAL Debug)
   add_definitions(-DDEBUG)
 endif(${CMAKE_BUILD_TYPE} STREQUAL Debug)
 
-# find libusb
-find_package( PkgConfig )
-if (PkgConfig_FOUND)
-  pkg_check_modules( LIBUSB libusb-1.0 )
-  if (LIBUSB_FOUND)
-    include_directories ( ${LIBUSB_INCLUDE_DIRS} )
-  else()
-    find_package ( USB1 REQUIRED )
-    include_directories ( ${LIBUSB_INCLUDE_DIR} )
-  endif()
-endif()
+# Find libusb
+find_package ( LibUSB REQUIRED )
+include_directories ( ${LIBUSB_INCLUDE_DIR} )
 
 # Find Boost
 if (FTDIPP OR BUILD_TESTS)
@@ -123,7 +117,7 @@ if ( WIN32 )
   set ( CPACK_NSIS_MODIFY_PATH             ON )
 endif ()
 
-set(CPACK_RESOURCE_FILE_LICENSE        ${CMAKE_SOURCE_DIR}/LICENSE)
+set(CPACK_RESOURCE_FILE_LICENSE        ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE)
 
 set(CPACK_SOURCE_GENERATOR             TGZ)
 set(CPACK_SOURCE_IGNORE_FILES          "\\\\.git;~$;build/")
@@ -138,52 +132,37 @@ endif ()
 set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${VERSION_STRING})
 add_custom_target(dist
     COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
-            | bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
-    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+      | bzip2 > ${PROJECT_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+
+add_subdirectory(src)
+add_subdirectory(packages)
 
 if ( DOCUMENTATION )
-  find_package ( Doxygen REQUIRED)
-
-  # Copy doxy.config.in
-  set(top_srcdir ${CMAKE_SOURCE_DIR})
-  configure_file(${CMAKE_SOURCE_DIR}/doc/Doxyfile.in 
${CMAKE_BINARY_DIR}/Doxyfile )
-  configure_file(${CMAKE_SOURCE_DIR}/doc/Doxyfile.xml.in 
${CMAKE_BINARY_DIR}/Doxyfile.xml )
-
-  # Run doxygen
-  add_custom_command(
-    OUTPUT ${CMAKE_BINARY_DIR}/doc/html/index.html
-    COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/doc
-    COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
-    COMMENT "Generating API documentation"
-    DEPENDS ${c_headers};${c_sources};${cpp_sources};${cpp_headers}
-  )
-
-  add_custom_target(
-    docs ALL
-    COMMENT "Documentation target docs"
-    DEPENDS ${CMAKE_BINARY_DIR}/doc/html/index.html
-  )
+  add_subdirectory(doc)
 endif ( DOCUMENTATION )
 
-add_subdirectory(src)
 if ( FTDIPP )
   project(libftdi1 C CXX)
   add_subdirectory(ftdipp)
-endif ()
+endif ( FTDIPP )
+
 if ( PYTHON_BINDINGS )
-add_subdirectory(python)
-endif ()
+  add_subdirectory(python)
+endif ( PYTHON_BINDINGS )
+
 if ( FTDI_EEPROM )
   add_subdirectory(ftdi_eeprom)
-endif ()
+endif ( FTDI_EEPROM )
+
 if ( EXAMPLES )
   add_subdirectory(examples)
-endif ()
-add_subdirectory(packages)
+endif ( EXAMPLES )
+
 if ( BUILD_TESTS )
   project(libftdi1 C CXX)
   add_subdirectory(test)
-endif ()
+endif ( BUILD_TESTS )
 
 # PkgConfig
 set(prefix      ${CMAKE_INSTALL_PREFIX})
@@ -197,9 +176,9 @@ if(${WIN32})
   set(libdir      ${CMAKE_INSTALL_PREFIX}/bin)
 endif(${WIN32})
 
-configure_file(${CMAKE_SOURCE_DIR}/libftdi1.pc.in 
${CMAKE_BINARY_DIR}/libftdi1.pc @ONLY)
-configure_file(${CMAKE_SOURCE_DIR}/libftdipp1.pc.in 
${CMAKE_BINARY_DIR}/libftdipp1.pc @ONLY)
-install(FILES ${CMAKE_BINARY_DIR}/libftdi1.pc ${CMAKE_BINARY_DIR}/libftdipp1.pc
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libftdi1.pc.in 
${CMAKE_CURRENT_BINARY_DIR}/libftdi1.pc @ONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libftdipp1.pc.in 
${CMAKE_CURRENT_BINARY_DIR}/libftdipp1.pc @ONLY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libftdi1.pc 
${CMAKE_CURRENT_BINARY_DIR}/libftdipp1.pc
         DESTINATION lib${LIB_SUFFIX}/pkgconfig)
 
 if (UNIX OR MINGW)
diff --git a/cmake/FindLibUSB.cmake b/cmake/FindLibUSB.cmake
new file mode 100644
index 0000000..766fc82
--- /dev/null
+++ b/cmake/FindLibUSB.cmake
@@ -0,0 +1,38 @@
+# - Try to find the libusb library
+# Once done this defines
+#
+#  LIBUSB_FOUND - system has libusb
+#  LIBUSB_INCLUDE_DIR - the libusb include directory
+#  LIBUSB_LIBRARIES - Link these to use libusb
+
+# Copyright (c) 2006, 2008  Laurent Montel, <montel@xxxxxxx>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+if (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
+
+  # in cache already
+  set(LIBUSB_FOUND TRUE)
+
+else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
+  # use pkg-config to get the directories and then use these values
+  # in the FIND_PATH() and FIND_LIBRARY() calls
+  find_package(PkgConfig)
+  pkg_check_modules(PC_LIBUSB libusb-1.0)
+
+  find_path(LIBUSB_INCLUDE_DIR libusb.h
+    PATH_SUFFIXES libusb-1.0
+    PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS})
+
+  find_library(LIBUSB_LIBRARIES NAMES usb-1.0
+    PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS})
+
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(
+    LibUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR
+  )
+
+  mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES)
+
+endif (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
diff --git a/cmake/FindUSB1.cmake b/cmake/FindUSB1.cmake
deleted file mode 100644
index b90e297..0000000
--- a/cmake/FindUSB1.cmake
+++ /dev/null
@@ -1,37 +0,0 @@
-# - Try to find the freetype library
-# Once done this defines
-#
-#  LIBUSB_FOUND - system has libusb
-#  LIBUSB_INCLUDE_DIR - the libusb include directory
-#  LIBUSB_LIBRARIES - Link these to use libusb
-
-# Copyright (c) 2006, 2008  Laurent Montel, <montel@xxxxxxx>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-if (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
-
-  # in cache already
-  set(LIBUSB_FOUND TRUE)
-
-else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
-  # use pkg-config to get the directories and then use these values
-  # in the FIND_PATH() and FIND_LIBRARY() calls
-  find_package(PkgConfig)
-  pkg_check_modules(PC_LIBUSB libusb-1.0)
-
-  FIND_PATH(LIBUSB_INCLUDE_DIR libusb.h
-    PATH_SUFFIXES libusb-1.0
-    PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS})
-
-  FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0
-    PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS})
-
-  include(FindPackageHandleStandardArgs)
-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES 
LIBUSB_INCLUDE_DIR)
-
-  MARK_AS_ADVANCED(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES)
-
-endif (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 0000000..983301d
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1,26 @@
+find_package ( Doxygen REQUIRED )
+
+# Copy doxy.config.in
+configure_file(
+  ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
+  ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+)
+
+configure_file(
+  ${PROJECT_SOURCE_DIR}/doc/Doxyfile.xml.in
+  ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.xml
+)
+
+# Run doxygen
+add_custom_command(
+  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html
+  COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+  COMMENT "Generating API documentation"
+  DEPENDS ${c_headers};${c_sources};${cpp_sources};${cpp_headers}
+)
+
+add_custom_target(
+  docs ALL
+  COMMENT "Documentation target docs"
+  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html
+)
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index d7ddff8..a05fe57 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -58,7 +58,7 @@ PROJECT_LOGO           =
 # entered, it will be relative to the location where doxygen was started. If
 # left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = doc
+OUTPUT_DIRECTORY       = @CMAKE_CURRENT_BINARY_DIR@
 
 # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
 # directories (in 2 levels) under the output directory of each output format 
and
@@ -759,8 +759,8 @@ WARN_LOGFILE           =
 # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
 # Note: If this tag is empty the current directory is searched.
 
-INPUT                  = @top_srcdir@/src \
-                         @top_srcdir@/ftdipp
+INPUT                  = @PROJECT_SOURCE_DIR@/src \
+                         @PROJECT_SOURCE_DIR@/ftdipp
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -833,7 +833,7 @@ EXCLUDE_SYMBOLS        =
 # that contain example code fragments that are included (see the \include
 # command).
 
-EXAMPLE_PATH           = @top_srcdir@/examples
+EXAMPLE_PATH           = @PROJECT_SOURCE_DIR@/examples
 
 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
diff --git a/doc/Doxyfile.xml.in b/doc/Doxyfile.xml.in
index 8a32509..ab57478 100644
--- a/doc/Doxyfile.xml.in
+++ b/doc/Doxyfile.xml.in
@@ -2,7 +2,7 @@
 
 # xml generation only
 # keep settings but shut off all other generation
-@INCLUDE = Doxyfile
+@INCLUDE = doc/Doxyfile
 
 GENERATE_TODOLIST      = NO
 GENERATE_TESTLIST      = NO
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 382cb33..9ec7bff 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -37,7 +37,7 @@ endif(NOT MINGW)
 
 # libftdi++ examples
 if( FTDIPP )
-  include_directories(BEFORE ${CMAKE_SOURCE_DIR}/ftdipp
+  include_directories(BEFORE ${PROJECT_SOURCE_DIR}/ftdipp
     ${Boost_INCLUDE_DIRS}
   )
 
@@ -49,4 +49,4 @@ if( FTDIPP )
 endif( FTDIPP )
 
 # Source includes
-include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src)
+include_directories(BEFORE ${PROJECT_SOURCE_DIR}/src)
diff --git a/ftdi_eeprom/CMakeLists.txt b/ftdi_eeprom/CMakeLists.txt
index 8737c4b..525421e 100644
--- a/ftdi_eeprom/CMakeLists.txt
+++ b/ftdi_eeprom/CMakeLists.txt
@@ -27,7 +27,7 @@ set ( EEPROM_MAJOR_VERSION 0 )
 set ( EEPROM_MINOR_VERSION 17 )
 set ( EEPROM_VERSION_STRING ${EEPROM_MAJOR_VERSION}.${EEPROM_MINOR_VERSION} )
 
-include_directories ( BEFORE ${CMAKE_SOURCE_DIR}/src )
+include_directories ( BEFORE ${PROJECT_SOURCE_DIR}/src )
 include_directories ( BEFORE ${CMAKE_CURRENT_BINARY_DIR} )
 
 configure_file(
diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt
index 38932ae..5e23a07 100644
--- a/ftdipp/CMakeLists.txt
+++ b/ftdipp/CMakeLists.txt
@@ -1,5 +1,3 @@
-# vim: ts=2:sw=2:sts=2
-
 # Targets
 set(cpp_sources ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.cpp CACHE INTERNAL "List of 
cpp sources" )
 set(cpp_headers ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.hpp CACHE INTERNAL "List of 
cpp headers" )
@@ -7,7 +5,7 @@ set(cpp_headers ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.hpp CACHE 
INTERNAL "List of cpp
 # Includes
 include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}
   ${CMAKE_CURRENT_SOURCE_DIR}
-  ${CMAKE_SOURCE_DIR}/src
+  ${PROJECT_SOURCE_DIR}/src
 )
 
 include_directories(${Boost_INCLUDE_DIRS})
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index f8ac423..5e406ff 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -18,7 +18,7 @@ find_package ( PythonInterp REQUIRED )
 find_package ( PythonLibs REQUIRED )
 
 include ( UseSWIG )
-include_directories ( BEFORE ${CMAKE_SOURCE_DIR}/src )
+include_directories ( BEFORE ${PROJECT_SOURCE_DIR}/src )
 include_directories ( ${PYTHON_INCLUDE_DIRS} )
 link_directories ( ${CMAKE_CURRENT_BINARY_DIR}/../src )
 
@@ -56,24 +56,28 @@ install ( TARGETS ${SWIG_MODULE_ftdi1_REAL_NAME} LIBRARY 
DESTINATION ${PYTHON_MO
 
 if ( DOCUMENTATION )
   # Run doxygen to only generate the xml
-  add_custom_command ( OUTPUT ${CMAKE_BINARY_DIR}/doc/xml/ftdi_8c.xml
-    COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/doc
-    COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile.xml
-    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+  add_custom_command ( OUTPUT ${PROJECT_BINARY_DIR}/doc/xml/ftdi_8c.xml
+    COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/doc/Doxyfile.xml
+    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+    COMMENT "Generating ftdi_8c.xml"
     DEPENDS ${c_headers};${c_sources};${cpp_sources};${cpp_headers}
   )
 
   # generate .i from doxygen .xml
   add_custom_command ( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ftdi1_doc.i
     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/doxy2swig.py -n
-            ${CMAKE_BINARY_DIR}/doc/xml/ftdi_8c.xml
-            ${CMAKE_CURRENT_BINARY_DIR}/ftdi1_doc.i
-    DEPENDS ${CMAKE_BINARY_DIR}/doc/xml/ftdi_8c.xml
+      ${PROJECT_BINARY_DIR}/doc/xml/ftdi_8c.xml
+      ${CMAKE_CURRENT_BINARY_DIR}/ftdi1_doc.i
+    COMMENT "Generating ftdi1_doc.i from ftdi_8c.xml"
+    DEPENDS ${PROJECT_BINARY_DIR}/doc/xml/ftdi_8c.xml
+  )
+  add_custom_target ( doc_i
+    COMMENT "Python API bindings documentation"
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ftdi1_doc.i
   )
-  add_custom_target ( doc_i DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ftdi1_doc.i )
   add_dependencies( ${SWIG_MODULE_ftdi1_REAL_NAME} doc_i )
 
-endif ()
+endif ( DOCUMENTATION )
 
 set ( LIBFTDI_PYTHON_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/${PYTHON_MODULE_PATH} 
)
 set ( LIBFTDI_PYTHON_MODULE_PATH ${LIBFTDI_PYTHON_MODULE_PATH} PARENT_SCOPE ) 
# for ftdiconfig.cmake
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 392c910..c44c614 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -2,7 +2,7 @@ find_package(Boost COMPONENTS unit_test_framework REQUIRED)
 
 enable_testing()
 
-INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/src ${Boost_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(BEFORE ${PROJECT_SOURCE_DIR}/src ${Boost_INCLUDE_DIRS})
 
 set(cpp_tests basic.cpp baudrate.cpp)
 


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.5-38-ge7f734f, libftdi-git <=