mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
Merge branch 'cmake'
This commit is contained in:
commit
d45cb7ef3a
14 changed files with 131 additions and 21 deletions
|
@ -1,3 +1,6 @@
|
|||
set(CMAKE_C_FLAGS "-std=gnu11")
|
||||
add_definitions(-D__USE_GNU)
|
||||
add_definitions(-D_GNU_SOURCE)
|
||||
|
||||
add_subdirectory(shared)
|
||||
add_subdirectory(wifi)
|
||||
|
@ -8,21 +11,10 @@ add_subdirectory(ctl)
|
|||
########### next target ###############
|
||||
|
||||
set(miracled_SRCS miracled.h miracled.c)
|
||||
include_directories(shared)
|
||||
link_directories(shared)
|
||||
add_executable(miracled ${miracled_SRCS})
|
||||
target_link_libraries(miracled miracle-shared)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules (GLIB2 REQUIRED glib-2.0)
|
||||
pkg_check_modules (UDEV REQUIRED glib-2.0)
|
||||
pkg_check_modules ( REQUIRED glib-2.0)
|
||||
if (GLIB2_FOUND)
|
||||
message("let's go $GLIB2_INCLUDE_DIRS $GLIB2_LIBRARIES")
|
||||
#include_directories(${BZIP_INCLUDE_DIRS})
|
||||
#target_link_libraries (miracled ${BZIP2_LIBRARIES})
|
||||
endif (GLIB2_FOUND)
|
||||
#target_link_libraries(miracled glib)
|
||||
install(TARGETS miracled DESTINATION bin)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/shared)
|
||||
|
||||
|
||||
########### install files ###############
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
find_package(Readline)
|
||||
########### next target ###############
|
||||
|
||||
set(miracle-wifictl_SRCS ctl.h
|
||||
|
@ -8,25 +9,42 @@ set(miracle-wifictl_SRCS ctl.h
|
|||
|
||||
add_executable(miracle-wifictl ${miracle-wifictl_SRCS})
|
||||
|
||||
target_link_libraries(miracle-wifictl ${KDE4_KDECORE_LIBS})
|
||||
|
||||
install(TARGETS miracle-wifictl DESTINATION bin)
|
||||
|
||||
if(READLINE_FOUND)
|
||||
message(STATUS "Compiling with Readline support")
|
||||
set_property(TARGET miracle-wifictl
|
||||
APPEND
|
||||
PROPERTY COMPILE_DEFINITIONS HAVE_READLINE)
|
||||
target_link_libraries(miracle-wifictl ${READLINE_LIBRARY})
|
||||
endif(READLINE_FOUND)
|
||||
|
||||
target_link_libraries(miracle-wifictl miracle-shared)
|
||||
########### next target ###############
|
||||
|
||||
set(miracle-sinkctl_SRCS ctl.h
|
||||
ctl-cli.c
|
||||
ctl-sink.c
|
||||
ctl-wifi.c
|
||||
sinkctl.c)
|
||||
sinkctl.c
|
||||
wfd.c)
|
||||
|
||||
|
||||
add_executable(miracle-sinkctl ${miracle-sinkctl_SRCS})
|
||||
|
||||
target_link_libraries(miracle-sinkctl ${KDE4_KDECORE_LIBS})
|
||||
|
||||
install(TARGETS miracle-sinkctl DESTINATION bin)
|
||||
|
||||
if(READLINE_FOUND)
|
||||
message(STATUS "Compiling with Readline support")
|
||||
set_property(TARGET miracle-sinkctl
|
||||
APPEND
|
||||
PROPERTY COMPILE_DEFINITIONS HAVE_READLINE)
|
||||
target_link_libraries(miracle-sinkctl ${READLINE_LIBRARY})
|
||||
endif(READLINE_FOUND)
|
||||
|
||||
target_link_libraries(miracle-sinkctl miracle-shared)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/shared)
|
||||
|
||||
########### install files ###############
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "wfd.h"
|
||||
#include "shl_macro.h"
|
||||
#include "shl_util.h"
|
||||
#include "config.h"
|
||||
|
||||
static sd_bus *bus;
|
||||
static struct ctl_wifi *wifi;
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "ctl.h"
|
||||
#include "shl_macro.h"
|
||||
#include "shl_util.h"
|
||||
#include "config.h"
|
||||
|
||||
static sd_bus *bus;
|
||||
static struct ctl_wifi *wifi;
|
||||
|
|
|
@ -13,9 +13,20 @@ set(miracle-dhcp_SRCS dhcp.c
|
|||
|
||||
add_executable(miracle-dhcp ${miracle-dhcp_SRCS})
|
||||
|
||||
target_link_libraries(miracle-dhcp ${KDE4_KDECORE_LIBS})
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules (GLIB2 REQUIRED glib-2.0)
|
||||
pkg_check_modules (UDEV REQUIRED libudev)
|
||||
link_directories( ${UDEV_LIBRARY_DIRS})
|
||||
include_directories( ${UDEV_INCLUDE_DIRS})
|
||||
target_link_libraries(miracle-dhcp ${UDEV_LIBRARIES})
|
||||
link_directories( ${GLIB2_LIBRARY_DIRS})
|
||||
include_directories( ${GLIB2_INCLUDE_DIRS})
|
||||
target_link_libraries(miracle-dhcp ${GLIB2_LIBRARIES})
|
||||
|
||||
target_link_libraries(miracle-dhcp miracle-shared)
|
||||
|
||||
install(TARGETS miracle-dhcp DESTINATION bin)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/shared)
|
||||
|
||||
|
||||
########### install files ###############
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
#include <unistd.h>
|
||||
#include "gdhcp.h"
|
||||
#include "shl_log.h"
|
||||
#include "config.h"
|
||||
|
||||
static const char *arg_netdev;
|
||||
static const char *arg_ip_binary = "/bin/ip";
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "shl_macro.h"
|
||||
#include "shl_log.h"
|
||||
#include "shl_util.h"
|
||||
#include "config.h"
|
||||
|
||||
static void manager_free(struct manager *m)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
set(CMAKE_C_FLAGS "-std=gnu11")
|
||||
|
||||
########### next target ###############
|
||||
find_package(PkgConfig)
|
||||
|
|
|
@ -12,11 +12,28 @@ add_executable(miracle-wifid ${miracle-wifid_SRCS})
|
|||
|
||||
target_link_libraries(miracle-wifid ${KDE4_KDECORE_LIBS})
|
||||
|
||||
install(TARGETS miracle-wifid DESTINATION bin)
|
||||
include_directories(shared)
|
||||
link_directories(shared)
|
||||
target_link_libraries(miracle-wifid miracle-shared)
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules (GLIB2 REQUIRED glib-2.0)
|
||||
pkg_check_modules (UDEV REQUIRED libudev)
|
||||
link_directories( ${UDEV_LIBRARY_DIRS})
|
||||
include_directories( ${UDEV_INCLUDE_DIRS})
|
||||
target_link_libraries(miracle-wifid ${UDEV_LIBRARIES})
|
||||
link_directories( ${GLIB2_LIBRARY_DIRS})
|
||||
include_directories( ${GLIB2_INCLUDE_DIRS})
|
||||
target_link_libraries(miracle-wifid ${GLIB2_LIBRARIES})
|
||||
|
||||
install(TARGETS miracle-wifid DESTINATION bin)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/shared)
|
||||
|
||||
########### install files ###############
|
||||
|
||||
#set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake-extensions/ )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "shl_util.h"
|
||||
#include "util.h"
|
||||
#include "wifid.h"
|
||||
#include "config.h"
|
||||
|
||||
#define DO_NOT_RELY_UDEV 0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue