aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2021-05-08 23:24:08 +0200
committerJan200101 <sentrycraft123@gmail.com>2021-05-08 23:24:08 +0200
commit6cc1ec3610ba98bada1fcd03a654b2925530f748 (patch)
treed772a02517cc8022100be2a89f8e4000559066ba /cmake
parent14e8bfdc0a83a1256f2efc92868ead7dbd26bc51 (diff)
downloadpolecat-6cc1ec3610ba98bada1fcd03a654b2925530f748.tar.gz
polecat-6cc1ec3610ba98bada1fcd03a654b2925530f748.zip
add work in progress windows support
to run lutris installers on windows soon
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindJsonC.cmake4
-rw-r--r--cmake/FindLibarchive.cmake14
-rw-r--r--cmake/FindLibcurl.cmake7
3 files changed, 19 insertions, 6 deletions
diff --git a/cmake/FindJsonC.cmake b/cmake/FindJsonC.cmake
index cada971..f3c90df 100644
--- a/cmake/FindJsonC.cmake
+++ b/cmake/FindJsonC.cmake
@@ -28,6 +28,7 @@ find_library(JSONC_LIB
ENV jsoncPath${_lib_suffix}
ENV jsoncPath
${_JSONC_LIBRARY_DIRS}
+ ${_JSONC_STATIC_LIBRARY_DIRS}
PATHS
/usr/lib /usr/local/lib)
@@ -38,4 +39,7 @@ mark_as_advanced(JSONC_INC JSONC_LIB)
if(JSONC_FOUND)
set(JSONC_INCLUDE_DIRS ${JSONC_INC})
set(JSONC_LIBRARIES ${JSONC_LIB})
+ if (BUILD_STATIC)
+ set(JSONC_LIBRARIES ${JSONC_LIBRARIES} ${_JSONC_STATIC_LIBRARY_DIRS})
+ endif()
endif() \ No newline at end of file
diff --git a/cmake/FindLibarchive.cmake b/cmake/FindLibarchive.cmake
index bba3a35..37ac6bb 100644
--- a/cmake/FindLibarchive.cmake
+++ b/cmake/FindLibarchive.cmake
@@ -16,18 +16,19 @@ endif()
find_path(LIBARCHIVE_INC
NAMES archive.h archive_entry.h
HINTS
- ENV libarcguvePath${_lib_suffix}
- ENV libarcguvePath
- ${_JSONC_INCLUDE_DIRS}
+ ENV libarchivePath${_lib_suffix}
+ ENV libarchivePath
+ ${_LIBARCHIVE_INCLUDE_DIRS}
PATHS
/usr/include /usr/local/include)
find_library(LIBARCHIVE_LIB
NAMES ${_LIBARCHIVE_LIBRARIES} archive
HINTS
- ENV libarcguvePath${_lib_suffix}
- ENV libarcguvePath
+ ENV libarchivePath${_lib_suffix}
+ ENV libarchivePath
${_LIBARCHIVE_LIBRARY_DIRS}
+ ${_LIBARCHIVE_STATIC_LIBRARY_DIRS}
PATHS
/usr/lib /usr/local/lib)
@@ -38,4 +39,7 @@ mark_as_advanced(LIBARCHIVE_INC LIBARCHIVE_LIB)
if(LIBARCHIVE_FOUND)
set(LIBARCHIVE_INCLUDE_DIRS ${LIBARCHIVE_INC})
set(LIBARCHIVE_LIBRARIES ${LIBARCHIVE_LIB})
+ if (BUILD_STATIC)
+ set(LIBARCHIVE_LIBRARIES ${LIBARCHIVE_LIBRARIES} ${_LIBARCHIVE_STATIC_LIBRARIES})
+ endif()
endif() \ No newline at end of file
diff --git a/cmake/FindLibcurl.cmake b/cmake/FindLibcurl.cmake
index 9be1b9d..fbe6505 100644
--- a/cmake/FindLibcurl.cmake
+++ b/cmake/FindLibcurl.cmake
@@ -4,7 +4,7 @@
find_package(PkgConfig QUIET)
if (PKG_CONFIG_FOUND)
- pkg_check_modules(_CURL QUIET curl)
+ pkg_check_modules(_CURL REQUIRED QUIET libcurl)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
@@ -28,6 +28,7 @@ find_library(CURL_LIB
ENV curlPath${_lib_suffix}
ENV curlPath
${_CURL_LIBRARY_DIRS}
+ ${_CURL_STATIC_LIBRARY_DIRS}
PATHS
/usr/lib /usr/local/lib)
@@ -38,4 +39,8 @@ mark_as_advanced(CURL_INC CURL_LIB)
if(LIBCURL_FOUND)
set(LIBCURL_INCLUDE_DIRS ${CURL_INC})
set(LIBCURL_LIBRARIES ${CURL_LIB})
+ if (BUILD_STATIC)
+ set(LIBCURL_LIBRARIES ${LIBCURL_LIBRARIES} ${_CURL_STATIC_LIBRARIES})
+ add_compile_definitions(CURL_STATICLIB)
+ endif()
endif() \ No newline at end of file