Browse Source

More Windows compatibility build fixes

- Still not verified to work though.
simple
Jacob Alexander 10 years ago
parent
commit
a82d239efc
1 changed files with 7 additions and 4 deletions
  1. 7
    4
      LoadFile/CMakeLists.txt

+ 7
- 4
LoadFile/CMakeLists.txt View File

list( APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} ) # Use local find scripts list( APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} ) # Use local find scripts


#| Linux - libusb #| Linux - libusb
if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
if( CMAKE_SYSTEM_NAME MATCHES "Linux" )
# Find libusb (not 1.0) # Find libusb (not 1.0)
find_package( LibUSB REQUIRED ) find_package( LibUSB REQUIRED )


set( LIBS ${LIBUSB_LIBRARIES} ) set( LIBS ${LIBUSB_LIBRARIES} )


#| Windows #| Windows
elseif( ${CMAKE_SYSTEM_NAME} MATCHES "Windows" )
elseif( CMAKE_SYSTEM_NAME MATCHES "CYGWIN" )
message( AUTHOR_WARNING "Not Tested...") message( AUTHOR_WARNING "Not Tested...")


# Defines # Defines
set( LIBS hid setupapi ) set( LIBS hid setupapi )


#| Mac OS X #| Mac OS X
elseif( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
message( AUTHOR_WARNING "Not Tested...") message( AUTHOR_WARNING "Not Tested...")


# Defines - XXX What is SDK? # Defines - XXX What is SDK?
set( DEFINES -DUSE_APPLE_IOKIT -isysroot ${SDK} -Wl,-syslibroot,${SDK} -framework IOKit -framework CoreFoundation ) set( DEFINES -DUSE_APPLE_IOKIT -isysroot ${SDK} -Wl,-syslibroot,${SDK} -framework IOKit -framework CoreFoundation )


#| BSD - NetBSD and OpenBSD #| BSD - NetBSD and OpenBSD
elseif( ${CMAKE_SYSTEM_NAME} MATCHES "BSD" )
elseif( CMAKE_SYSTEM_NAME MATCHES "BSD" )
message( AUTHOR_WARNING "Not Tested...") message( AUTHOR_WARNING "Not Tested...")


# Defines # Defines
set( DEFINES -s -DUSE_UHID ) set( DEFINES -s -DUSE_UHID )
#| Unregonized OS
else()
message( FATAL_ERROR "${CMAKE_SYSTEM_NAME}: OS Not Recognized..." )
endif() endif()