aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2020-10-20 20:14:41 +0200
committerJan200101 <sentrycraft123@gmail.com>2020-10-20 20:14:41 +0200
commitdb8ae62fb64fa33657f598a62045f17fc779ef8b (patch)
tree26de2baf2506c6acd072770d220b77ecb3aed60c
parenta8038e640523a65ac347be9f674348ecc11ce356 (diff)
downloadpolecat-db8ae62fb64fa33657f598a62045f17fc779ef8b.tar.gz
polecat-db8ae62fb64fa33657f598a62045f17fc779ef8b.zip
properly include header directories, change how json-c is found
-rw-r--r--CMakeLists.txt7
-rw-r--r--cmake/FindJsonC.cmake4
-rw-r--r--src/dxvk.c2
-rw-r--r--src/lutris.h2
-rw-r--r--src/net.c2
-rw-r--r--src/net.h2
-rw-r--r--src/wine.c2
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 <stdio.h>
#include <string.h>
-#include <json-c/json.h>
+#include <json.h>
#include <libgen.h>
#include <linux/limits.h>
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 <json-c/json.h>
+#include <json.h>
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 <stdlib.h>
#include <stdint.h>
#include <curl/curl.h>
-#include <json-c/json.h>
+#include <json.h>
#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 <json-c/json.h>
+#include <json.h>
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 <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <json-c/json.h>
+#include <json.h>
#include <libgen.h>
#include <unistd.h>
#include <linux/limits.h>