diff options
author | Benjamin Dobell <benjamin.dobell+git@glassechidna.com.au> | 2015-02-16 15:23:22 +0100 |
---|---|---|
committer | Benjamin Dobell <benjamin.dobell+git@glassechidna.com.au> | 2015-02-18 16:49:11 +0100 |
commit | 09ba1839225ea6adcba65ebec2f3a783edd6647d (patch) | |
tree | 8927087313c2d718350f540fd109a13383f3de0a /heimdall/CMakeLists.txt | |
parent | Fix UNIX CMake (and OS X autotools) builds for Heimdall CLI (diff) | |
download | Heimdall-09ba1839225ea6adcba65ebec2f3a783edd6647d.tar Heimdall-09ba1839225ea6adcba65ebec2f3a783edd6647d.tar.gz Heimdall-09ba1839225ea6adcba65ebec2f3a783edd6647d.tar.bz2 Heimdall-09ba1839225ea6adcba65ebec2f3a783edd6647d.tar.lz Heimdall-09ba1839225ea6adcba65ebec2f3a783edd6647d.tar.xz Heimdall-09ba1839225ea6adcba65ebec2f3a783edd6647d.tar.zst Heimdall-09ba1839225ea6adcba65ebec2f3a783edd6647d.zip |
Diffstat (limited to 'heimdall/CMakeLists.txt')
-rw-r--r-- | heimdall/CMakeLists.txt | 66 |
1 files changed, 7 insertions, 59 deletions
diff --git a/heimdall/CMakeLists.txt b/heimdall/CMakeLists.txt index bbb72d3..4e87afd 100644 --- a/heimdall/CMakeLists.txt +++ b/heimdall/CMakeLists.txt @@ -2,89 +2,37 @@ 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(libusb_USE_STATIC_LIBS YES) +find_package(libusb REQUIRED) set(LIBPIT_INCLUDE_DIRS ../libpit/Source) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") +set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static") -include_directories(SYSTEM ${LIBUSB_1_INCLUDE_DIRS}) +include_directories(SYSTEM ${LIBUSB_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) + source/VersionAction.cpp) include(LargeFiles) -use_large_files(heimdall false) +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) -else(WIN32) - target_link_libraries(heimdall PRIVATE usb-1.0) -endif(WIN32) +target_link_libraries(heimdall PRIVATE usb-1.0) |