From 1ddfdc1a880279ce07b2c43f60b7aa138d4ad315 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Mon, 17 Nov 2014 07:02:07 +1100 Subject: CMake files for Heimdall CLI and mingw support --- heimdall/CMakeLists.txt | 88 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 heimdall/CMakeLists.txt (limited to 'heimdall/CMakeLists.txt') diff --git a/heimdall/CMakeLists.txt b/heimdall/CMakeLists.txt new file mode 100644 index 0000000..8887211 --- /dev/null +++ b/heimdall/CMakeLists.txt @@ -0,0 +1,88 @@ +cmake_minimum_required(VERSION 2.8.4) + +project(heimdall) + +if(WIN32) + set(LIBUSB_1_INCLUDE_DIRS + ../libusb-1.0/include) +else(WIN32) + find_package(libusb-1.0 REQUIRED) +endif(WIN32) + +set(LIBPIT_INCLUDE_DIRS + ../libpit/Source) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") + +include_directories(SYSTEM ${LIBUSB_1_INCLUDE_DIRS}) + +include_directories(${LIBPIT_INCLUDE_DIRS}) + +set(HEIMDALL_SOURCE_FILES + source/Arguments.cpp + source/Arguments.h + source/BeginDumpPacket.h + source/BeginSessionPacket.h + source/BridgeManager.cpp + source/BridgeManager.h + source/ClosePcScreenAction.cpp + source/ClosePcScreenAction.h + source/ControlPacket.h + source/DetectAction.cpp + source/DetectAction.h + source/DeviceTypePacket.h + source/DownloadPitAction.cpp + source/DownloadPitAction.h + source/DumpPartFileTransferPacket.h + source/DumpPartPitFilePacket.h + source/DumpResponse.h + source/EndFileTransferPacket.h + source/EndModemFileTransferPacket.h + source/EndPhoneFileTransferPacket.h + source/EndPitFileTransferPacket.h + source/EndSessionPacket.h + source/FilePartSizePacket.h + source/FileTransferPacket.h + source/FlashAction.cpp + source/FlashAction.h + source/FlashPartFileTransferPacket.h + source/FlashPartPitFilePacket.h + source/Heimdall.h + source/HelpAction.cpp + source/HelpAction.h + source/InboundPacket.h + source/InfoAction.cpp + source/InfoAction.h + source/Interface.cpp + source/Interface.h + source/main.cpp + source/OutboundPacket.h + source/Packet.h + source/PitFilePacket.h + source/PitFileResponse.h + source/PrintPitAction.cpp + source/PrintPitAction.h + source/ReceiveFilePartPacket.h + source/ResponsePacket.h + source/SendFilePartPacket.h + source/SendFilePartResponse.h + source/SessionSetupPacket.h + source/SessionSetupResponse.h + source/SetupSessionPacket.h + source/SetupSessionResponse.h + source/TotalBytesPacket.h + source/Utility.cpp + source/Utility.h + source/VersionAction.cpp + source/VersionAction.h) + +include(LargeFiles) +use_large_files(heimdall YES) +add_executable(heimdall ${HEIMDALL_SOURCE_FILES}) + +target_link_libraries(heimdall PRIVATE pit) + +LINK_DIRECTORIES(../libusb-1.0/lib/mingw) +if(WIN32) + target_link_libraries(heimdall PRIVATE ${CMAKE_SOURCE_DIR}/libusb-1.0/lib/mingw/libusb-1.0.a) +endif(WIN32) -- cgit v1.2.3