Changeset 1188


Ignore:
Timestamp:
01/11/10 18:01:17 (11 years ago)
Author:
rorothetroll
Message:

resync with trunk .. part 3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/smartreader/csctapi/CMakeLists.txt

    r1187 r1188  
    44file (GLOB csctapi_hdrs "*.h")
    55
     6check_include_file ("usb.h" HAVE_LIBUSB)
     7if (HAVE_LIBUSB)
     8    add_definitions ("-DHAVE_LIBUSB")
     9endif (HAVE_LIBUSB)
     10
     11if (HAVE_LIBUSB)
     12    target_link_libraries (${exe_name} usb)
     13endif (HAVE_LIBUSB)
     14
    615if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
    7 add_definitions ("-O2 -Winline -Werror -finline-functions -fomit-frame-pointer -s -m32")
     16    add_definitions ("-O2 -Winline -Werror -finline-functions -fomit-frame-pointer -s -m32")
     17    SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" )
     18    FIND_PATH( USB_INCLUDE usb.h)
     19    if( ${USB_INCLUDE} MATCHES "USB_INCLUDE-NOTFOUND" )
     20        set (HAVE_LIBUSB "0")
     21    else ( ${USB_INCLUDE} MATCHES "USB_INCLUDE-NOTFOUND" )
     22        FIND_LIBRARY (USB_LIBRARY usb)
     23        target_link_libraries ( ${exe_name} ${USB_LIBRARY})
     24        include_directories( SYSTEM ${USB_INCLUDE} )
     25        set (HAVE_LIBUSB "1")
     26    endif ( ${USB_INCLUDE} MATCHES "USB_INCLUDE-NOTFOUND" )
    827else (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
    9 add_definitions ("-O2 -Winline -Werror -finline-functions -fomit-frame-pointer -s")
     28    add_definitions ("-O2 -Winline -Werror -finline-functions -fomit-frame-pointer -s")
    1029endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
    1130
    1231set (lib_name "csctapi")
    13 
    1432add_library (${lib_name} STATIC ${csctapi_srcs} ${csctapi_hdrs})
    1533
Note: See TracChangeset for help on using the changeset viewer.