diff options
Diffstat (limited to 'cmake/modules/FindCpluff.cmake')
| -rw-r--r-- | cmake/modules/FindCpluff.cmake | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/cmake/modules/FindCpluff.cmake b/cmake/modules/FindCpluff.cmake deleted file mode 100644 index 9e29e17..0000000 --- a/cmake/modules/FindCpluff.cmake +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | # - Builds Cpluff as external project | ||
| 2 | # Once done this will define | ||
| 3 | # | ||
| 4 | # CPLUFF_FOUND - system has cpluff | ||
| 5 | # CPLUFF_INCLUDE_DIRS - the cpluff include directories | ||
| 6 | # | ||
| 7 | # and link Kodi against the cpluff libraries. | ||
| 8 | |||
| 9 | find_package(EXPAT REQUIRED) | ||
| 10 | if(CORE_SYSTEM_NAME MATCHES windows) | ||
| 11 | add_subdirectory(${CMAKE_SOURCE_DIR}/lib/cpluff) | ||
| 12 | set(CPLUFF_LIBRARIES $<TARGET_FILE:libcpluff> ${EXPAT_LIBRARIES}) | ||
| 13 | else() | ||
| 14 | string(REPLACE ";" " " defines "${CMAKE_C_FLAGS} ${SYSTEM_DEFINES} -I${EXPAT_INCLUDE_DIR}") | ||
| 15 | get_filename_component(expat_dir ${EXPAT_LIBRARY} DIRECTORY) | ||
| 16 | set(ldflags "-L${expat_dir}") | ||
| 17 | |||
| 18 | # iOS: Without specifying -arch, configure tries to use /bin/cpp as C-preprocessor | ||
| 19 | # http://stackoverflow.com/questions/38836754/cant-cross-compile-c-library-for-arm-ios | ||
| 20 | if(CORE_SYSTEM_NAME STREQUAL ios) | ||
| 21 | set(cppflags "-arch ${CPU}") | ||
| 22 | endif() | ||
| 23 | |||
| 24 | ExternalProject_Add(libcpluff SOURCE_DIR ${CMAKE_SOURCE_DIR}/lib/cpluff | ||
| 25 | BUILD_IN_SOURCE 1 | ||
| 26 | PREFIX ${CORE_BUILD_DIR}/cpluff | ||
| 27 | CONFIGURE_COMMAND AR=${CMAKE_AR} RANLIB=${CMAKE_RANLIB} CC=${CMAKE_C_COMPILER} ${CMAKE_SOURCE_DIR}/lib/cpluff/configure | ||
| 28 | --disable-nls | ||
| 29 | --enable-static | ||
| 30 | --disable-shared | ||
| 31 | --with-pic | ||
| 32 | --prefix=<INSTALL_DIR> | ||
| 33 | --libdir=<INSTALL_DIR>/lib | ||
| 34 | --host=${ARCH} | ||
| 35 | CFLAGS=${defines} | ||
| 36 | CPPFLAGS=${cppflags} | ||
| 37 | LDFLAGS=${ldflags} | ||
| 38 | BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libcpluff.a) | ||
| 39 | ExternalProject_Add_Step(libcpluff autoreconf | ||
| 40 | DEPENDEES download update patch | ||
| 41 | DEPENDERS configure | ||
| 42 | COMMAND rm -f config.status | ||
| 43 | COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} autoreconf -vif | ||
| 44 | WORKING_DIRECTORY <SOURCE_DIR>) | ||
| 45 | |||
| 46 | set(CPLUFF_LIBRARIES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cpluff/lib/libcpluff.a ${EXPAT_LIBRARIES}) | ||
| 47 | endif() | ||
| 48 | set(CPLUFF_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cpluff/include) | ||
| 49 | set(CPLUFF_FOUND 1) | ||
| 50 | mark_as_advanced(CPLUFF_INCLUDE_DIRS CPLUFF_LIBRARIES) | ||
| 51 | set_target_properties(libcpluff PROPERTIES FOLDER "External Projects") | ||
