X-Git-Url: http://developer.intra2net.com/git/?a=blobdiff_plain;f=CMakeLists.txt;h=4c43a4818ed080883d66da12835572e30687fbf6;hb=c9a460e336631ed3d21e6f870d4137d5e98c30a7;hp=73517cf79b6536dd58970545306b0e7b8af58e48;hpb=f276fe667f966ba9e39ec67c64443e91aec479f0;p=libftdi diff --git a/CMakeLists.txt b/CMakeLists.txt index 73517cf..4c43a48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Project project(libftdi) -set(MAJOR_VERSION 0) -set(MINOR_VERSION 17) +set(MAJOR_VERSION 1) +set(MINOR_VERSION 0) set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}) SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") @@ -43,17 +43,20 @@ set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development") set(CPACK_COMPONENT_STATICLIBS_GROUP "Development") set(CPACK_COMPONENT_HEADERS_GROUP "Development") +# automatically set lib suffix +if ( UNIX AND NOT APPLE AND NOT CMAKE_CROSSCOMPILING AND NOT EXISTS "/etc/debian_version" ) + if ( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT LIB_SUFFIX ) + set ( LIB_SUFFIX 64 ) + endif () +endif () + if(NOT APPLE) - # Create suffix to eventually install in lib64 if(CMAKE_SIZEOF_VOID_P EQUAL 4) - SET(LIB_SUFFIX "") SET(PACK_ARCH "") else(CMAKE_SIZEOF_VOID_P EQUAL 8) - SET(LIB_SUFFIX 64) SET(PACK_ARCH .x86_64) endif(CMAKE_SIZEOF_VOID_P EQUAL 4) else(NOT APPLE) - SET(LIB_SUFFIX "") SET(PACK_ARCH "") endif(NOT APPLE) @@ -99,7 +102,14 @@ add_subdirectory(bindings) add_subdirectory(ftdi_eeprom) add_subdirectory(examples) add_subdirectory(packages) - +add_subdirectory(test) + +# "make dist" target +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}) # Documentation