From db8ae62fb64fa33657f598a62045f17fc779ef8b Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Tue, 20 Oct 2020 20:14:41 +0200 Subject: properly include header directories, change how json-c is found --- CMakeLists.txt | 7 ++++++- cmake/FindJsonC.cmake | 4 ++-- src/dxvk.c | 2 +- src/lutris.h | 2 +- src/net.c | 2 +- src/net.h | 2 +- src/wine.c | 2 +- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 750c419..b81d1ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,11 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") endif() add_executable(${CMAKE_PROJECT_NAME} ${SOURCES}) + target_link_libraries(${CMAKE_PROJECT_NAME} LINK_PUBLIC ${LIBCURL_LIBRARIES}) target_link_libraries(${CMAKE_PROJECT_NAME} LINK_PUBLIC ${JSONC_LIBRARIES}) -target_link_libraries(${CMAKE_PROJECT_NAME} LINK_PUBLIC ${LIBARCHIVE_LIBRARIES}) \ No newline at end of file +target_link_libraries(${CMAKE_PROJECT_NAME} LINK_PUBLIC ${LIBARCHIVE_LIBRARIES}) + +target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ${LIBCURL_INCLUDE_DIRS}) +target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ${JSONC_INCLUDE_DIRS}) +target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ${LIBARCHIVE_INCLUDE_DIRS}) \ No newline at end of file diff --git a/cmake/FindJsonC.cmake b/cmake/FindJsonC.cmake index 9dfcf4a..028bb2f 100644 --- a/cmake/FindJsonC.cmake +++ b/cmake/FindJsonC.cmake @@ -14,13 +14,13 @@ else() endif() find_path(JSONC_INC - NAMES json-c/json.h + NAMES json.h HINTS ENV jsoncPath${_lib_suffix} ENV jsoncPath ${_JSONC_INCLUDE_DIRS} PATHS - /usr/include /usr/local/include) + /usr/include/json-c /usr/local/include/json-c) find_library(JSONC_LIB NAMES ${_JSONC_LIBRARIES} jsonc json-c diff --git a/src/dxvk.c b/src/dxvk.c index cf4dcb3..f219455 100644 --- a/src/dxvk.c +++ b/src/dxvk.c @@ -1,7 +1,7 @@ #include #include -#include +#include #include #include diff --git a/src/lutris.h b/src/lutris.h index f3db00f..f3f648d 100644 --- a/src/lutris.h +++ b/src/lutris.h @@ -1,7 +1,7 @@ #ifndef LUTRIS_H #define LUTRIS_H -#include +#include enum keyword { MOVE = 0, diff --git a/src/net.c b/src/net.c index 5fb1093..bacfc8b 100644 --- a/src/net.c +++ b/src/net.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include "net.h" #include "common.h" diff --git a/src/net.h b/src/net.h index 5bc5c6e..91f6828 100644 --- a/src/net.h +++ b/src/net.h @@ -1,7 +1,7 @@ #ifndef NET_H #define NET_H -#include +#include size_t WriteMemoryCallback(void*, size_t, size_t, void*); struct MemoryStruct* downloadToRam(const char* URL); diff --git a/src/wine.c b/src/wine.c index 596617e..aaaeef9 100644 --- a/src/wine.c +++ b/src/wine.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include -- cgit v1.2.3