aboutsummaryrefslogtreecommitdiffstats
path: root/heimdall
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2015-02-17 01:23:22 +1100
committerBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2015-02-19 02:49:11 +1100
commit09ba1839225ea6adcba65ebec2f3a783edd6647d (patch)
tree8927087313c2d718350f540fd109a13383f3de0a /heimdall
parent69c3aafd81e2804216361ac13eea4b157594ce24 (diff)
downloadexternal_heimdall-09ba1839225ea6adcba65ebec2f3a783edd6647d.zip
external_heimdall-09ba1839225ea6adcba65ebec2f3a783edd6647d.tar.gz
external_heimdall-09ba1839225ea6adcba65ebec2f3a783edd6647d.tar.bz2
Update Heimdall CLI build to use an MSYS2 environment
Diffstat (limited to 'heimdall')
-rw-r--r--heimdall/CMakeLists.txt66
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)