Changeset 345

Show
Ignore:
Timestamp:
05/24/08 19:33:58 (5 months ago)
Author:
hsattler
Message:

require CMake-2.6 and let the linker find the right ws2_32 library (setting $LIB is not needed anymore)

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r339 r345  
    1 cmake_minimum_required ( VERSION 2.4.7 FATAL_ERROR ) 
     1cmake_minimum_required ( VERSION 2.6 FATAL_ERROR ) 
    22 
    33project ( openobex C ) 
  • trunk/glib/CMakeLists.txt

    r339 r345  
    6969 
    7070if ( WIN32 ) 
    71   find_library ( winsock2_LIBRARY ws2_32 ) 
    72   mark_as_advanced( winsock2_LIBRARY ) 
    73   if ( winsock2_LIBRARY ) 
    74     target_link_libraries ( openobex-glib  
    75       ${winsock2_LIBRARY} 
    76     ) 
    77   endif ( winsock2_LIBRARY ) 
     71  target_link_libraries ( openobex-glib  
     72    ws2_32 
     73  ) 
    7874endif ( WIN32 ) 
    7975 
  • trunk/lib/CMakeLists.txt

    r339 r345  
    7676  ) 
    7777  include_directories ( BEFORE SYSTEM ${LibUSB_INCLUDE_DIRS} ) 
    78   link_directories ( ${LibUSB_LIBRARY_DIRS} ) 
    7978  list ( APPEND SOURCES 
    8079    usbobex.c 
     
    103102  endif ( CMAKE_COMPILER_IS_GNUCC ) 
    104103 
    105   find_library ( winsock2_LIBRARY NAMES ws2_32 ) 
    106104  list ( APPEND ${OPENOBEX_LIB_NAME}_LIBRARIES 
    107     ${winsock2_LIBRARY} 
     105    ws2_32 
    108106  ) 
    109107