Fix setenv/unsetenv link errors by implementing a local version using Windows SetEnvironmentVariable.

Untested, and does not comply with the error returns per setenv.
This commit is contained in:
Alex Lian 2013-01-27 22:34:58 -05:00 committed by Romuald Conty
parent 9f682cc52b
commit ef33827f04
3 changed files with 64 additions and 1 deletions

View file

@ -1,3 +1,11 @@
# Windows MinGW workarounds
IF(WIN32)
message("Adding in contrib win32 sources")
SET(WINDOWS_SOURCES ../contrib/win32/nfc_win32)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../contrib/win32)
message("Win32: " ${WINDOWS_SOURCES})
ENDIF(WIN32)
# Library's chips
SET(CHIPS_SOURCES chips/pn53x)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/chips)
@ -29,7 +37,7 @@ IF(LIBUSB_FOUND)
ENDIF(LIBUSB_FOUND)
# Library
SET(LIBRARY_SOURCES nfc nfc-device nfc-emulation nfc-internal conf iso14443-subr mirror-subr target-subr ${DRIVERS_SOURCES} ${BUSES_SOURCES} ${CHIPS_SOURCES})
SET(LIBRARY_SOURCES nfc nfc-device nfc-emulation nfc-internal conf iso14443-subr mirror-subr target-subr log ${DRIVERS_SOURCES} ${BUSES_SOURCES} ${CHIPS_SOURCES} ${WINDOWS_SOURCES})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
IF(LIBNFC_DEBUG_OUTPUT)
LIST(APPEND LIBRARY_SOURCES log-printf)