aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2018-03-23 19:00:00 +0100
committerRechi <Rechi@users.noreply.github.com>2018-03-23 19:00:00 +0100
commit4ccaa382df464e8e3e76e3ea6cc04b04582188af (patch)
tree62d2969b8f946606a7a283d451ca42e01246d5c0
parent14ffbe39d6a3b0cfbf334653d0f03d88f690acbe (diff)
[windows] build cpluff from source
-rw-r--r--cmake/modules/FindCpluff.cmake28
-rw-r--r--project/BuildDependencies/scripts/0_package.target-win10-arm.list1
-rw-r--r--project/BuildDependencies/scripts/0_package.target-win10-win32.list1
-rw-r--r--project/BuildDependencies/scripts/0_package.target-win10-x64.list1
-rw-r--r--project/BuildDependencies/scripts/0_package.target-win32.list1
-rw-r--r--project/BuildDependencies/scripts/0_package.target-x64.list1
6 files changed, 8 insertions, 25 deletions
diff --git a/cmake/modules/FindCpluff.cmake b/cmake/modules/FindCpluff.cmake
index ed897dfb0b..9e29e1736c 100644
--- a/cmake/modules/FindCpluff.cmake
+++ b/cmake/modules/FindCpluff.cmake
@@ -6,8 +6,11 @@
#
# and link Kodi against the cpluff libraries.
-if(NOT WIN32)
- find_package(EXPAT REQUIRED)
+find_package(EXPAT REQUIRED)
+if(CORE_SYSTEM_NAME MATCHES windows)
+ add_subdirectory(${CMAKE_SOURCE_DIR}/lib/cpluff)
+ set(CPLUFF_LIBRARIES $<TARGET_FILE:libcpluff> ${EXPAT_LIBRARIES})
+else()
string(REPLACE ";" " " defines "${CMAKE_C_FLAGS} ${SYSTEM_DEFINES} -I${EXPAT_INCLUDE_DIR}")
get_filename_component(expat_dir ${EXPAT_LIBRARY} DIRECTORY)
set(ldflags "-L${expat_dir}")
@@ -41,23 +44,8 @@ if(NOT WIN32)
WORKING_DIRECTORY <SOURCE_DIR>)
set(CPLUFF_LIBRARIES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cpluff/lib/libcpluff.a ${EXPAT_LIBRARIES})
- set(CPLUFF_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cpluff/include)
- set(CPLUFF_FOUND 1)
- mark_as_advanced(CPLUFF_INCLUDE_DIRS CPLUFF_LIBRARIES)
-else()
- find_path(CPLUFF_INCLUDE_DIR cpluff.h)
- find_library(CPLUFF_LIBRARY NAMES cpluff)
-
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(Cpluff
- REQUIRED_VARS CPLUFF_INCLUDE_DIR CPLUFF_LIBRARY)
-
- if(CPLUFF_FOUND)
- set(CPLUFF_LIBRARIES ${CPLUFF_LIBRARY})
- set(CPLUFF_INCLUDE_DIRS ${CPLUFF_INCLUDE_DIR})
- endif()
- mark_as_advanced(CPLUFF_INCLUDE_DIRS CPLUFF_LIBRARY)
-
- add_custom_target(libcpluff)
endif()
+set(CPLUFF_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cpluff/include)
+set(CPLUFF_FOUND 1)
+mark_as_advanced(CPLUFF_INCLUDE_DIRS CPLUFF_LIBRARIES)
set_target_properties(libcpluff PROPERTIES FOLDER "External Projects")
diff --git a/project/BuildDependencies/scripts/0_package.target-win10-arm.list b/project/BuildDependencies/scripts/0_package.target-win10-arm.list
index 137b829ee4..0382bfc309 100644
--- a/project/BuildDependencies/scripts/0_package.target-win10-arm.list
+++ b/project/BuildDependencies/scripts/0_package.target-win10-arm.list
@@ -6,7 +6,6 @@
; -> sqlite-3.7.12.1-win32\system\sqlite3.dll
; -> ...
;PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER!
-cpluff-0.1.3-win10-ARM-v140.7z
crossguid-fef89a4-win10-ARM-v140.7z
curl-7.52.1-win10-ARM-v140.7z
expat-2.2.0-win10-ARM-v140.7z
diff --git a/project/BuildDependencies/scripts/0_package.target-win10-win32.list b/project/BuildDependencies/scripts/0_package.target-win10-win32.list
index 55eac79ccd..050820b71d 100644
--- a/project/BuildDependencies/scripts/0_package.target-win10-win32.list
+++ b/project/BuildDependencies/scripts/0_package.target-win10-win32.list
@@ -6,7 +6,6 @@
; -> sqlite-3.7.12.1-win32\system\sqlite3.dll
; -> ...
;PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER!
-cpluff-0.1.3-win10-Win32-v140.7z
crossguid-fef89a4-win10-Win32-v140.7z
curl-7.52.1-win10-Win32-v140.7z
expat-2.2.0-win10-Win32-v140.7z
diff --git a/project/BuildDependencies/scripts/0_package.target-win10-x64.list b/project/BuildDependencies/scripts/0_package.target-win10-x64.list
index 4775807547..5a14c9f222 100644
--- a/project/BuildDependencies/scripts/0_package.target-win10-x64.list
+++ b/project/BuildDependencies/scripts/0_package.target-win10-x64.list
@@ -6,7 +6,6 @@
; -> sqlite-3.7.12.1-win32\system\sqlite3.dll
; -> ...
;PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER!
-cpluff-0.1.3-win10-x64-v140.7z
crossguid-fef89a4-win10-x64-v140.7z
curl-7.52.1-win10-x64-v140.7z
expat-2.2.0-win10-x64-v140.7z
diff --git a/project/BuildDependencies/scripts/0_package.target-win32.list b/project/BuildDependencies/scripts/0_package.target-win32.list
index e03079be34..36554f4eab 100644
--- a/project/BuildDependencies/scripts/0_package.target-win32.list
+++ b/project/BuildDependencies/scripts/0_package.target-win32.list
@@ -6,7 +6,6 @@
; -> sqlite-3.7.12.1-win32\system\sqlite3.dll
; -> ...
;PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER!
-cpluff-ed7874fc-win32-vc140.7z
crossguid-8f399e-win32-vc140-v3.7z
curl-7.48-win32-vc140.7z
dnssd-765.50.9-win32-vc140-v2.7z
diff --git a/project/BuildDependencies/scripts/0_package.target-x64.list b/project/BuildDependencies/scripts/0_package.target-x64.list
index 1d3ed052ca..0b422582ec 100644
--- a/project/BuildDependencies/scripts/0_package.target-x64.list
+++ b/project/BuildDependencies/scripts/0_package.target-x64.list
@@ -6,7 +6,6 @@
; -> sqlite-3.7.12.1-win32\system\sqlite3.dll
; -> ...
;PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER!
-cpluff-0.1.3-x64-vc140.7z
crossguid-fef89a4-x64-vc140.7z
curl-7.52.1-x64-vc140.7z
dnssd-765.50.9-x64-vc140-v2.7z