diff options
author | StapleButter <thetotalworm@gmail.com> | 2018-02-19 12:50:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-19 12:50:54 +0100 |
commit | 12e33ae872795518aba882c57857dfefbc0c0eda (patch) | |
tree | 35024e05886caffc81ecdaf8d5bf4ea442a36ea9 | |
parent | 981661a36d691c00f3499d6cf5a3a4db6736a626 (diff) | |
parent | 549bcf6d71f7bb31c8be6e1d8700ab51c55b6987 (diff) |
Merge pull request #222 from dogtopus/master
Fix build on linux, enable build directory support
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/WifiAP.cpp | 3 | ||||
-rw-r--r-- | src/libui_sdl/Platform.cpp | 1 |
3 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 195f9d4..9d7a0e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,8 +90,12 @@ if (UNIX) ADD_DEFINITIONS(${GTK3_CFLAGS_OTHER}) add_custom_command(OUTPUT melon_grc.c - COMMAND glib-compile-resources --generate-source melon_grc.xml - COMMAND glib-compile-resources --generate-header melon_grc.xml) + COMMAND glib-compile-resources --sourcedir="${CMAKE_CURRENT_SOURCE_DIR}" + --target="${CMAKE_CURRENT_BINARY_DIR}/melon_grc.c" + --generate-source "${CMAKE_CURRENT_SOURCE_DIR}/melon_grc.xml" + COMMAND glib-compile-resources --sourcedir="${CMAKE_CURRENT_SOURCE_DIR}" + --target="${CMAKE_CURRENT_BINARY_DIR}/melon_grc.h" + --generate-header "${CMAKE_CURRENT_SOURCE_DIR}/melon_grc.xml") if (CMAKE_SYSTEM_NAME STREQUAL "Linux") LINK_LIBRARIES("dl") diff --git a/src/WifiAP.cpp b/src/WifiAP.cpp index f8c9f79..963b4d2 100644 --- a/src/WifiAP.cpp +++ b/src/WifiAP.cpp @@ -23,6 +23,9 @@ #include "WifiAP.h" #include "Platform.h" +#ifndef __WIN32__ +#include <stddef.h> +#endif namespace WifiAP { diff --git a/src/libui_sdl/Platform.cpp b/src/libui_sdl/Platform.cpp index 507e0f3..80aa0e9 100644 --- a/src/libui_sdl/Platform.cpp +++ b/src/libui_sdl/Platform.cpp @@ -38,6 +38,7 @@ #define socket_t int #define sockaddr_t struct sockaddr #define closesocket close + #define PCAP_OPENFLAG_PROMISCUOUS 1 #endif #ifndef INVALID_SOCKET |