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.1 From b9e722768f47d9118d594fba5cf00fc1c90ee862 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Mon, 17 Nov 2014 16:06:06 +1100 Subject: CMake build fixes --- heimdall/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'heimdall/CMakeLists.txt') diff --git a/heimdall/CMakeLists.txt b/heimdall/CMakeLists.txt index 8887211..a66a336 100644 --- a/heimdall/CMakeLists.txt +++ b/heimdall/CMakeLists.txt @@ -85,4 +85,6 @@ 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(heimdalll PRIVATE usb-1.0) endif(WIN32) -- cgit v1.1 From 69c3aafd81e2804216361ac13eea4b157594ce24 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Wed, 10 Dec 2014 00:50:30 +1100 Subject: Fix UNIX CMake (and OS X autotools) builds for Heimdall CLI --- heimdall/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'heimdall/CMakeLists.txt') diff --git a/heimdall/CMakeLists.txt b/heimdall/CMakeLists.txt index a66a336..bbb72d3 100644 --- a/heimdall/CMakeLists.txt +++ b/heimdall/CMakeLists.txt @@ -77,7 +77,7 @@ set(HEIMDALL_SOURCE_FILES source/VersionAction.h) include(LargeFiles) -use_large_files(heimdall YES) +use_large_files(heimdall false) add_executable(heimdall ${HEIMDALL_SOURCE_FILES}) target_link_libraries(heimdall PRIVATE pit) @@ -86,5 +86,5 @@ 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(heimdalll PRIVATE usb-1.0) + target_link_libraries(heimdall PRIVATE usb-1.0) endif(WIN32) -- cgit v1.1 From 09ba1839225ea6adcba65ebec2f3a783edd6647d Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Tue, 17 Feb 2015 01:23:22 +1100 Subject: Update Heimdall CLI build to use an MSYS2 environment --- heimdall/CMakeLists.txt | 66 ++++++------------------------------------------- 1 file changed, 7 insertions(+), 59 deletions(-) (limited to 'heimdall/CMakeLists.txt') 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) -- cgit v1.1 From b22ae7b89f7993f632e10e18c116f293f314575f Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Thu, 19 Feb 2015 03:13:56 +1100 Subject: Removed autotools and VS files, and standardised source dir naming --- heimdall/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'heimdall/CMakeLists.txt') diff --git a/heimdall/CMakeLists.txt b/heimdall/CMakeLists.txt index 4e87afd..a822702 100644 --- a/heimdall/CMakeLists.txt +++ b/heimdall/CMakeLists.txt @@ -6,7 +6,7 @@ set(libusb_USE_STATIC_LIBS YES) find_package(libusb REQUIRED) set(LIBPIT_INCLUDE_DIRS - ../libpit/Source) + ../libpit/source) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static") -- cgit v1.1 From 67c17cc48bc3a2914d8e6ecb39ec1fb54b4806aa Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Thu, 19 Feb 2015 05:08:26 +1100 Subject: Fix Unix build issues and work-around Qt5 Mac UI bugs --- heimdall/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'heimdall/CMakeLists.txt') diff --git a/heimdall/CMakeLists.txt b/heimdall/CMakeLists.txt index a822702..82dc2d3 100644 --- a/heimdall/CMakeLists.txt +++ b/heimdall/CMakeLists.txt @@ -9,7 +9,10 @@ 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") + +if(MINGW) + set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static") +endif(MINGW) include_directories(SYSTEM ${LIBUSB_INCLUDE_DIRS}) -- cgit v1.1 From 625fdf27366e6a15a645866abc0608e3b7925663 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Fri, 20 Feb 2015 23:56:47 +1100 Subject: Fix issue with Linux specific code not compiling (#261) --- heimdall/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'heimdall/CMakeLists.txt') diff --git a/heimdall/CMakeLists.txt b/heimdall/CMakeLists.txt index 82dc2d3..ef927bf 100644 --- a/heimdall/CMakeLists.txt +++ b/heimdall/CMakeLists.txt @@ -14,6 +14,10 @@ if(MINGW) set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static") endif(MINGW) +if(LINUX) + add_definitions(-DOS_LINUX) +endif(LINUX) + include_directories(SYSTEM ${LIBUSB_INCLUDE_DIRS}) include_directories(${LIBPIT_INCLUDE_DIRS}) -- cgit v1.1 From 8cb7f3dd875f4ac74c026da871239c688ab6e61b Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Fri, 6 Mar 2015 00:46:51 +1100 Subject: Actually fix #261 (CMake Linux detection) --- heimdall/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'heimdall/CMakeLists.txt') diff --git a/heimdall/CMakeLists.txt b/heimdall/CMakeLists.txt index ef927bf..58ff83b 100644 --- a/heimdall/CMakeLists.txt +++ b/heimdall/CMakeLists.txt @@ -14,9 +14,9 @@ if(MINGW) set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static") endif(MINGW) -if(LINUX) +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") add_definitions(-DOS_LINUX) -endif(LINUX) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") include_directories(SYSTEM ${LIBUSB_INCLUDE_DIRS}) -- cgit v1.1 From d0526a3b74a003dfc6f805682693be9173ffcd88 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Sat, 21 Mar 2015 14:53:43 +1100 Subject: Do not use static libusb-1.0 by default on Linux. --- heimdall/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'heimdall/CMakeLists.txt') diff --git a/heimdall/CMakeLists.txt b/heimdall/CMakeLists.txt index 58ff83b..95cdbe2 100644 --- a/heimdall/CMakeLists.txt +++ b/heimdall/CMakeLists.txt @@ -2,7 +2,10 @@ cmake_minimum_required(VERSION 2.8.4) project(heimdall) -set(libusb_USE_STATIC_LIBS YES) +if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux") AND (NOT DEFINED libusb_USE_STATIC_LIBS)) + set(libusb_USE_STATIC_LIBS YES) +endif((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux") AND (NOT DEFINED libusb_USE_STATIC_LIBS)) + find_package(libusb REQUIRED) set(LIBPIT_INCLUDE_DIRS -- cgit v1.1 From d2e2f76556a950bc9a98b36d3c7500b5c122fe8c Mon Sep 17 00:00:00 2001 From: Jani Date: Sun, 17 Jul 2016 23:37:28 +0300 Subject: Use the found libusb --- heimdall/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'heimdall/CMakeLists.txt') diff --git a/heimdall/CMakeLists.txt b/heimdall/CMakeLists.txt index 95cdbe2..58a1d43 100644 --- a/heimdall/CMakeLists.txt +++ b/heimdall/CMakeLists.txt @@ -45,4 +45,4 @@ use_large_files(heimdall YES) add_executable(heimdall ${HEIMDALL_SOURCE_FILES}) target_link_libraries(heimdall PRIVATE pit) -target_link_libraries(heimdall PRIVATE usb-1.0) +target_link_libraries(heimdall PRIVATE ${LIBUSB_LIBRARY}) -- cgit v1.1 From b6fe7f8535355eb8025f4872efef6cd7d3993db6 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Wed, 20 Jul 2016 16:11:53 +1000 Subject: Revert "Merge pull request #355 from ljani/master" This reverts commit 9784dd2e2a34b567a239f39aa0d550c519272040, reversing changes made to 7ebee1e87728a468bda9547c83b42317acd0e676. --- heimdall/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'heimdall/CMakeLists.txt') diff --git a/heimdall/CMakeLists.txt b/heimdall/CMakeLists.txt index 58a1d43..95cdbe2 100644 --- a/heimdall/CMakeLists.txt +++ b/heimdall/CMakeLists.txt @@ -45,4 +45,4 @@ use_large_files(heimdall YES) add_executable(heimdall ${HEIMDALL_SOURCE_FILES}) target_link_libraries(heimdall PRIVATE pit) -target_link_libraries(heimdall PRIVATE ${LIBUSB_LIBRARY}) +target_link_libraries(heimdall PRIVATE usb-1.0) -- cgit v1.1