Changeset 1636


Ignore:
Timestamp:
02/20/10 22:42:31 (11 years ago)
Author:
merek
Message:

Merge from UMP r1753 - thanks to roro ;)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r1625 r1636  
    162162endif(HAVE_DVBAPI)
    163163
     164if (WEBIF)
     165    add_definitions ("-DWEBIF")
     166endif (WEBIF)
     167
    164168check_include_file ("pthread.h" HAVE_PTHREAD)
    165169if (HAVE_PTHREAD)
     
    238242                add_library(imp_libusb STATIC IMPORTED)
    239243                set_property(TARGET imp_libusb PROPERTY IMPORTED_LOCATION /usr/local/lib/libusb-1.0.a)
     244            elseif (EXISTS /usr/lib/libusb-1.0.a)
     245                message(STATUS "  static libusb 1.0 found : /usr/lib/libusb-1.0.a . Adding smartreader support ")
     246                add_definitions ("-DLIBUSB")
     247                add_library(imp_libusb STATIC IMPORTED)
     248                set_property(TARGET imp_libusb PROPERTY IMPORTED_LOCATION /usr/lib/libusb-1.0.a)
    240249            else (EXISTS /usr/local/lib/libusb-1.0.a)
    241                 message(STATUS "  static libusb 1.0 not found (/usr/local/lib/libusb-1.0.a) . No smartreader support ")
     250                message(STATUS "  static libusb 1.0 not found (not in /usr/local/lib/ or /usr/lib/) . No smartreader support ")
    242251                unset(HAVE_LIBUSB)
    243252                unset(HAVE_LIBRT)
     
    488497    message (STATUS "  use system libusb functions")
    489498endif (HAVE_LIBUSB)
     499if (WEBIF)
     500    message (STATUS "  Web interface enabled")
     501endif (WEBIF)
    490502message (STATUS "")
  • trunk/utils/CMakeLists.txt

    r1592 r1636  
    184184        if (HAVE_LIBUSB AND HAVE_PTHREAD)
    185185            if (EXISTS ${LIBUSBDIR}/lib/libusb-1.0.a)
    186                 message(STATUS "  static libusb 1.0 found (${LIBUSBDIR}/lib/libusb-1.0.a). Adding smartreader support ")
     186                message(STATUS "Utils: static libusb 1.0 found (${LIBUSBDIR}/lib/libusb-1.0.a). Adding smartreader support ")
    187187                add_definitions ("-DLIBUSB")
    188188                add_definitions ("-I${LIBUSBDIR}/include/")
     
    190190                set_property(TARGET utils_imp_libusb PROPERTY IMPORTED_LOCATION ${LIBUSBDIR}/lib/libusb-1.0.a)
    191191            else (EXISTS ${LIBUSBDIR}/lib/libusb-1.0.a)
    192                 message(STATUS "  static libusb 1.0 not found (${LIBUSBDIR}/lib/libusb-1.0.a). No smartreader support ")
     192                message(STATUS "Utils:  static libusb 1.0 not found (${LIBUSBDIR}/lib/libusb-1.0.a). No smartreader support ")
    193193                unset(HAVE_LIBUSB)
    194194                unset(HAVE_LIBRT)
     
    196196            endif (EXISTS ${LIBUSBDIR}/lib/libusb-1.0.a)
    197197        else (HAVE_LIBUSB AND HAVE_PTHREAD)
    198             message(STATUS "  no libusb 1.0 found. No smartreader support")
     198            message(STATUS "Utils: no libusb 1.0 found. No smartreader support")
    199199        endif (HAVE_LIBUSB AND HAVE_PTHREAD)
    200200    else (LIBUSBDIR)
     
    202202        if (HAVE_LIBUSB AND HAVE_PTHREAD)
    203203            if (EXISTS /usr/local/lib/libusb-1.0.a)
    204                 message(STATUS "  static libusb 1.0 found : /usr/local/lib/libusb-1.0.a . Adding smartreader support ")
     204                message(STATUS "Utils: static libusb 1.0 found : /usr/local/lib/libusb-1.0.a . Adding smartreader support ")
    205205                add_definitions ("-DLIBUSB")
    206206                add_definitions ("-I/usr/local/include")
    207207                add_library(utils_imp_libusb STATIC IMPORTED)
    208208                set_property(TARGET utils_imp_libusb PROPERTY IMPORTED_LOCATION /usr/local/lib/libusb-1.0.a)
     209            elseif (EXISTS /usr/lib/libusb-1.0.a)
     210                message(STATUS "Utils: static libusb 1.0 found : /usr/lib/libusb-1.0.a . Adding smartreader support ")
     211                add_definitions ("-DLIBUSB")
     212                add_library(utils_imp_libusb STATIC IMPORTED)
     213                set_property(TARGET utils_imp_libusb PROPERTY IMPORTED_LOCATION /usr/lib/libusb-1.0.a)
    209214            else (EXISTS /usr/local/lib/libusb-1.0.a)
    210                 message(STATUS "  static libusb 1.0 not found (/usr/local/lib/libusb-1.0.a) . No smartreader support ")
     215                message(STATUS "Utils: static libusb 1.0 not found (not in /usr/local/lib/ or /usr/lib/) . No smartreader support ")
    211216                unset(HAVE_LIBUSB)
    212217                unset(HAVE_LIBRT)
     
    220225
    221226
     227if( HAVE_LIBRT OR HAVE_LIBRT_STATIC)
    222228#---- are we building ?
    223229if (HAVE_LIBUSB)
     
    234240add_executable (${util_name} ${exe_srcs} ${exe_hdrs})
    235241
    236 target_link_libraries (${util_name} utils_imp_libusb)
    237 
    238 if(HAVE_LIBRT AND NOT OSCamOperatingSystem MATCHES "Mac OS X")
    239     target_link_libraries (${util_name} rt)
    240 endif(HAVE_LIBRT AND NOT OSCamOperatingSystem MATCHES "Mac OS X")
    241 
    242 if (HAVE_LIBRT_STATIC)
    243     target_link_libraries (${util_name} utils_imp_librt)
    244 endif (HAVE_LIBRT_STATIC)
     242if(HAVE_LIBRT AND HAVE_LIBUSB)
     243    target_link_libraries (${util_name} imp_libusb)
     244    if (NOT OSCamOperatingSystem MATCHES "Mac OS X")
     245        target_link_libraries (${util_name} rt)
     246    endif (NOT OSCamOperatingSystem MATCHES "Mac OS X")
     247endif(HAVE_LIBRT AND HAVE_LIBUSB)
     248
     249if (HAVE_LIBRT_STATIC AND HAVE_LIBUSB)
     250    target_link_libraries (${util_name} imp_libusb)
     251    if (NOT OSCamOperatingSystem MATCHES "Mac OS X")
     252    target_link_libraries (${util_name} imp_librt)
     253    endif (NOT OSCamOperatingSystem MATCHES "Mac OS X")
     254endif (HAVE_LIBRT_STATIC AND HAVE_LIBUSB)
    245255
    246256if (HAVE_PTHREAD)
     
    307317#----------------------- printout resume -----------------------------
    308318
    309 message (STATUS "Utils:  operating system: ${OSCamOperatingSystem}")
    310 message (STATUS "Utils:  system type: ${CS_OSTYPE}")
    311 message (STATUS "Utils:  system: ${CS_OS_SYS}")
    312 message (STATUS "Utils:  cpu: ${CS_OS_CPU}")
    313 message (STATUS "Utils:  hw: ${CS_OS_HW}")
    314 message (STATUS "Utils:  use system static libusb")
     319message (STATUS "Utils: operating system: ${OSCamOperatingSystem}")
     320message (STATUS "Utils: system type: ${CS_OSTYPE}")
     321message (STATUS "Utils: system: ${CS_OS_SYS}")
     322message (STATUS "Utils: cpu: ${CS_OS_CPU}")
     323message (STATUS "Utils: hw: ${CS_OS_HW}")
     324message (STATUS "Utils: use system static libusb")
    315325message (STATUS "")
    316326endif (HAVE_LIBUSB)
     327endif( HAVE_LIBRT OR HAVE_LIBRT_STATIC)
Note: See TracChangeset for help on using the changeset viewer.