WOrk on fixing windows
This commit is contained in:
@@ -19,18 +19,24 @@ set(SOURCES
|
||||
os.h
|
||||
wiiuse_internal.h
|
||||
wiiboard.h)
|
||||
|
||||
set(API
|
||||
wiiuse.h)
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND SOURCES io_win.c)
|
||||
list(APPEND API ../msvc-stdint/stdint.h)
|
||||
else()
|
||||
list(APPEND SOURCES io_nix.c)
|
||||
endif()
|
||||
|
||||
set(API
|
||||
wiiuse.h)
|
||||
|
||||
|
||||
add_library(wiiuse SHARED ${SOURCES} ${API})
|
||||
target_link_libraries(wiiuse m bluetooth)
|
||||
if(WIN32)
|
||||
target_link_libraries(Ws2_32.lib hid.lib
|
||||
else()
|
||||
target_link_libraries(wiiuse m bluetooth)
|
||||
endif()
|
||||
|
||||
set_property(TARGET
|
||||
wiiuse
|
||||
|
||||
@@ -50,16 +50,16 @@
|
||||
/* Information output macros */
|
||||
#define WIIUSE_INFO(fmt, ...) fprintf(stderr, "[INFO] " fmt "\n", ##__VA_ARGS__)
|
||||
|
||||
#ifdef WITH_WIIUSE_DEBUG
|
||||
#ifdef WIN32
|
||||
#define WIIUSE_DEBUG(fmt, ...) do { \
|
||||
char* file = __FILE__; \
|
||||
int i = strlen(file) - 1; \
|
||||
for (; i && (file[i] != '\\'); --i); \
|
||||
fprintf(stderr, "[DEBUG] %s:%i: " fmt "\n", file+i+1, __LINE__, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#ifdef WITH_WIIUSE_DEBUG
|
||||
#ifdef WIN32
|
||||
#define WIIUSE_DEBUG(fmt, ...) do { \
|
||||
char* file = __FILE__; \
|
||||
int i = strlen(file) - 1; \
|
||||
for (; i && (file[i] != '\\'); --i); \
|
||||
fprintf(stderr, "[DEBUG] %s:%i: " fmt "\n", file+i+1, __LINE__, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#else
|
||||
#define WIIUSE_DEBUG(fmt, ...) fprintf(stderr, "[DEBUG] " __FILE__ ":%i: " fmt "\n", __LINE__, ##__VA_ARGS__)
|
||||
#define WIIUSE_DEBUG(fmt, ...) fprintf(stderr, "[DEBUG] " __FILE__ ":%i: " fmt "\n", __LINE__, ##__VA_ARGS__)
|
||||
#endif
|
||||
#else
|
||||
#define WIIUSE_DEBUG(fmt, ...)
|
||||
|
||||
Reference in New Issue
Block a user