2024-01-10 06:58:31 +00:00
|
|
|
cmake_minimum_required(VERSION 3.27)
|
|
|
|
project(chuniio_brokenithm)
|
|
|
|
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
|
|
|
|
include_directories("${CMAKE_SOURCE_DIR}/include/")
|
|
|
|
set(CMAKE_C_STANDARD 11)
|
|
|
|
|
|
|
|
link_directories(src)
|
|
|
|
add_library(chuniio_brokenithm SHARED src/chuniio.c
|
|
|
|
src/chuniio.h
|
|
|
|
src/config.c
|
|
|
|
src/config.h
|
|
|
|
src/leddata.h
|
|
|
|
src/ledoutput.c
|
|
|
|
src/ledoutput.h
|
|
|
|
src/pipeimpl.c
|
|
|
|
src/pipeimpl.h
|
|
|
|
src/serialimpl.c
|
|
|
|
src/serialimpl.h
|
|
|
|
src/servers/socket.h
|
|
|
|
src/ipc_memory_info.h
|
|
|
|
src/servers/android.c
|
|
|
|
src/servers/android.h
|
|
|
|
src/servers/common.h
|
|
|
|
src/servers/common.c
|
|
|
|
src/servers/ios.c
|
|
|
|
src/servers/ios.h)
|
|
|
|
|
|
|
|
target_link_libraries(chuniio_brokenithm util)
|
|
|
|
set_target_properties(chuniio_brokenithm PROPERTIES PREFIX "")
|
|
|
|
target_include_directories(chuniio_brokenithm PRIVATE src)
|
|
|
|
|
|
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
|
|
# Ugly hack around libimobiledevice shipping a DllMain for some reason???
|
|
|
|
set_target_properties(chuniio_brokenithm PROPERTIES LINK_FLAGS "-Wl,--allow-multiple-definition")
|
|
|
|
|
|
|
|
target_link_libraries(chuniio_brokenithm "-static-libgcc -Wl,-Bstatic -limobiledevice-1.0 -lssl -lcrypto -lplist-2.0 -lusbmuxd-2.0 -lpthread -Wl,-Bdynamic -lws2_32 -lcrypt32 -liphlpapi")
|
|
|
|
elseif (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
|
|
target_link_libraries(chuniio_brokenithm "-static-libgcc")
|
|
|
|
endif ()
|