2023-12-30 05:02:40 +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_CXX_STANDARD 17)
|
|
|
|
|
2023-12-30 10:43:30 +00:00
|
|
|
set(CMAKE_C_COMPILER "gcc")
|
|
|
|
set(CMAKE_CXX_COMPILER "g++")
|
|
|
|
|
2023-12-30 16:50:42 +00:00
|
|
|
include(CheckIPOSupported)
|
|
|
|
check_ipo_supported(RESULT supported OUTPUT error)
|
|
|
|
|
|
|
|
if (supported)
|
|
|
|
message(STATUS "IPO / LTO enabled")
|
|
|
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
|
|
|
else()
|
|
|
|
message(STATUS "IPO / LTO not supported: <${error}>")
|
|
|
|
endif()
|
|
|
|
|
2023-12-30 05:02:40 +00:00
|
|
|
link_directories(src)
|
|
|
|
add_library(chuniio_brokenithm SHARED src/chuniio.c
|
|
|
|
src/chuniio.h
|
|
|
|
src/config.c
|
|
|
|
src/config.h
|
|
|
|
src/socket.h
|
|
|
|
src/struct.h
|
|
|
|
src/util/dprintf.c
|
|
|
|
src/util/dprintf.h)
|
|
|
|
|
|
|
|
set_target_properties(chuniio_brokenithm PROPERTIES PREFIX "")
|
2023-12-30 10:43:30 +00:00
|
|
|
set_target_properties(chuniio_brokenithm PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32 -Wl,--allow-multiple-definition")
|
2023-12-30 16:50:42 +00:00
|
|
|
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")
|