-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: apply formatting to all files
- Loading branch information
Showing
9 changed files
with
147 additions
and
1,347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,19 +11,22 @@ set(JUCE_WEB_BROWSER OFF) | |
set(BUILD_TESTING OFF) | ||
|
||
if(WIN32) | ||
set(CAN_DRIVER "WindowsPCANBasic") | ||
list(APPEND CAN_DRIVER "TouCAN") | ||
|
||
if(NOT (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND MINGW)) | ||
list(APPEND CAN_DRIVER "WindowsInnoMakerUSB2CAN") | ||
else() | ||
message(STATUS "InnoMaker hardware will not be supported in this build because you are using mingw") | ||
endif() | ||
list(APPEND CAN_DRIVER "SYS_TEC") | ||
set(CAN_DRIVER "WindowsPCANBasic") | ||
list(APPEND CAN_DRIVER "TouCAN") | ||
|
||
if(NOT (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND MINGW)) | ||
list(APPEND CAN_DRIVER "WindowsInnoMakerUSB2CAN") | ||
else() | ||
message( | ||
STATUS | ||
"InnoMaker hardware will not be supported in this build because you are using mingw" | ||
) | ||
endif() | ||
list(APPEND CAN_DRIVER "SYS_TEC") | ||
elseif(APPLE) | ||
set(CAN_DRIVER "MacCANPCAN") | ||
set(CAN_DRIVER "MacCANPCAN") | ||
else() | ||
set(CAN_DRIVER "SocketCAN") | ||
set(CAN_DRIVER "SocketCAN") | ||
endif() | ||
|
||
find_package(JUCE MODULE) | ||
|
@@ -32,21 +35,28 @@ find_package(Threads REQUIRED) | |
|
||
juce_add_gui_app( | ||
AgISOVirtualTerminal | ||
ICON_BIG doc/smallLogo.png | ||
ICON_BIG | ||
doc/smallLogo.png | ||
# image file to use as an icon ICON_SMALL ... | ||
COMPANY_NAME "Open-Agriculture" | ||
COMPANY_COPYRIGHT "Open-Agriculture" | ||
COMPANY_WEBSITE "https://github.com/Open-Agriculture" | ||
PRODUCT_NAME "AgISOVirtualTerminal" | ||
NEEDS_CURL FALSE | ||
NEEDS_WEB_BROWSER FALSE | ||
DESCRIPTION "An ISO11783-6 Server") | ||
COMPANY_NAME | ||
"Open-Agriculture" | ||
COMPANY_COPYRIGHT | ||
"Open-Agriculture" | ||
COMPANY_WEBSITE | ||
"https://github.com/Open-Agriculture" | ||
PRODUCT_NAME | ||
"AgISOVirtualTerminal" | ||
NEEDS_CURL | ||
FALSE | ||
NEEDS_WEB_BROWSER | ||
FALSE | ||
DESCRIPTION | ||
"An ISO11783-6 Server") | ||
|
||
set_target_properties(AgISOVirtualTerminal PROPERTIES CXX_STANDARD 17) | ||
|
||
target_compile_definitions(AgISOVirtualTerminal PRIVATE | ||
JUCE_USE_CURL=0 | ||
JUCE_WEB_BROWSER=0) | ||
target_compile_definitions(AgISOVirtualTerminal PRIVATE JUCE_USE_CURL=0 | ||
JUCE_WEB_BROWSER=0) | ||
|
||
juce_generate_juce_header(AgISOVirtualTerminal) | ||
|
||
|
@@ -88,80 +98,101 @@ target_sources( | |
"src/InputListComponent.cpp" | ||
"src/ShortcutsWindow.cpp") | ||
|
||
|
||
target_include_directories(AgISOVirtualTerminal | ||
PRIVATE ${CMAKE_CURRENT_LIST_DIR}/include) | ||
|
||
target_link_libraries( | ||
AgISOVirtualTerminal | ||
PRIVATE juce::juce_gui_extra juce::juce_audio_basics juce::juce_audio_utils isobus::Isobus isobus::HardwareIntegration | ||
isobus::Utility | ||
PRIVATE juce::juce_gui_extra juce::juce_audio_basics juce::juce_audio_utils | ||
isobus::Isobus isobus::HardwareIntegration isobus::Utility | ||
PUBLIC juce::juce_recommended_config_flags juce::juce_recommended_lto_flags) | ||
|
||
if(WIN32) | ||
add_custom_command( | ||
TARGET AgISOVirtualTerminal POST_BUILD | ||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${CMAKE_CURRENT_LIST_DIR}/lib/PCANBasic.dll "$<TARGET_FILE_DIR:AgISOVirtualTerminal>" | ||
VERBATIM | ||
) | ||
|
||
add_custom_command( | ||
TARGET AgISOVirtualTerminal POST_BUILD | ||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${CMAKE_CURRENT_LIST_DIR}/lib/Usbcan64.dll "$<TARGET_FILE_DIR:AgISOVirtualTerminal>" | ||
VERBATIM | ||
) | ||
|
||
add_custom_command( | ||
TARGET AgISOVirtualTerminal POST_BUILD | ||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${CMAKE_CURRENT_LIST_DIR}/lib/canal.dll "$<TARGET_FILE_DIR:AgISOVirtualTerminal>" | ||
VERBATIM | ||
) | ||
|
||
add_custom_command( | ||
TARGET AgISOVirtualTerminal POST_BUILD | ||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${CMAKE_CURRENT_LIST_DIR}/lib/InnoMakerUsb2CanLib.dll "$<TARGET_FILE_DIR:AgISOVirtualTerminal>" | ||
VERBATIM | ||
) | ||
add_custom_command( | ||
TARGET AgISOVirtualTerminal | ||
POST_BUILD | ||
COMMENT "Copying PCANBasic.dll to the build directory" | ||
COMMAND | ||
"${CMAKE_COMMAND}" -E copy_if_different | ||
${CMAKE_CURRENT_LIST_DIR}/lib/PCANBasic.dll | ||
"$<TARGET_FILE_DIR:AgISOVirtualTerminal>" | ||
VERBATIM) | ||
|
||
add_custom_command( | ||
TARGET AgISOVirtualTerminal | ||
POST_BUILD | ||
COMMENT "Copying Usbcan64.dll to the build directory" | ||
COMMAND | ||
"${CMAKE_COMMAND}" -E copy_if_different | ||
${CMAKE_CURRENT_LIST_DIR}/lib/Usbcan64.dll | ||
"$<TARGET_FILE_DIR:AgISOVirtualTerminal>" | ||
VERBATIM) | ||
|
||
add_custom_command( | ||
TARGET AgISOVirtualTerminal | ||
POST_BUILD | ||
COMMENT "Copying canal.dll to the build directory" | ||
COMMAND | ||
"${CMAKE_COMMAND}" -E copy_if_different | ||
${CMAKE_CURRENT_LIST_DIR}/lib/canal.dll | ||
"$<TARGET_FILE_DIR:AgISOVirtualTerminal>" | ||
VERBATIM) | ||
|
||
add_custom_command( | ||
TARGET AgISOVirtualTerminal | ||
POST_BUILD | ||
COMMENT "Copying InnoMakerUsb2CanLib.dll to the build directory" | ||
COMMAND | ||
"${CMAKE_COMMAND}" -E copy_if_different | ||
${CMAKE_CURRENT_LIST_DIR}/lib/InnoMakerUsb2CanLib.dll | ||
"$<TARGET_FILE_DIR:AgISOVirtualTerminal>" | ||
VERBATIM) | ||
endif() | ||
|
||
if(APPLE) | ||
install( | ||
TARGETS AgISOVirtualTerminal | ||
RUNTIME | ||
DESTINATION bin | ||
BUNDLE DESTINATION . | ||
COMPONENT applications | ||
) | ||
install( | ||
TARGETS AgISOVirtualTerminal | ||
RUNTIME DESTINATION bin | ||
BUNDLE DESTINATION . COMPONENT applications) | ||
else() | ||
install( | ||
TARGETS AgISOVirtualTerminal | ||
RUNTIME | ||
DESTINATION bin | ||
COMPONENT applications | ||
) | ||
install(TARGETS AgISOVirtualTerminal RUNTIME DESTINATION bin | ||
COMPONENT applications) | ||
endif() | ||
|
||
if(MSVC) | ||
install(FILES ${CMAKE_CURRENT_LIST_DIR}/lib/Usbcan64.dll DESTINATION bin COMPONENT applications) | ||
install(FILES ${CMAKE_CURRENT_LIST_DIR}/lib/PCANBasic.dll DESTINATION bin COMPONENT applications) | ||
install(FILES ${CMAKE_CURRENT_LIST_DIR}/lib/canal.dll DESTINATION bin COMPONENT applications) | ||
install(FILES ${CMAKE_CURRENT_LIST_DIR}/lib/InnoMakerUsb2CanLib.dll DESTINATION bin COMPONENT applications) | ||
install( | ||
FILES ${CMAKE_CURRENT_LIST_DIR}/lib/Usbcan64.dll | ||
DESTINATION bin | ||
COMPONENT applications) | ||
install( | ||
FILES ${CMAKE_CURRENT_LIST_DIR}/lib/PCANBasic.dll | ||
DESTINATION bin | ||
COMPONENT applications) | ||
install( | ||
FILES ${CMAKE_CURRENT_LIST_DIR}/lib/canal.dll | ||
DESTINATION bin | ||
COMPONENT applications) | ||
install( | ||
FILES ${CMAKE_CURRENT_LIST_DIR}/lib/InnoMakerUsb2CanLib.dll | ||
DESTINATION bin | ||
COMPONENT applications) | ||
endif() | ||
|
||
set (CPACK_PACKAGE_NAME "AgISOVirtualTerminal") | ||
set (CPACK_PACKAGE_VENDOR "Open-Agriculture") | ||
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "An ISO11783-6 Server") | ||
set (CPACK_PACKAGE_VERSION "1.3.0") | ||
set (CPACK_PACKAGE_VERSION_MAJOR "1") | ||
set (CPACK_PACKAGE_VERSION_MINOR "3") | ||
set (CPACK_PACKAGE_VERSION_PATCH "0") | ||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "AgISOVirtualTerminal") | ||
set (CPACK_COMPONENTS_ALL applications) | ||
set (CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "AgISOVirtualTerminal") | ||
set (CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "A free and open source ISO11783-6 Server") | ||
set (CPACK_PACKAGE_CONTACT "[email protected]") | ||
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_LIST_DIR}/LICENSE") | ||
set (CPACK_PACKAGE_EXECUTABLES "AgISOVirtualTerminal" "AgISOVirtualTerminal") | ||
set(CPACK_PACKAGE_NAME "AgISOVirtualTerminal") | ||
set(CPACK_PACKAGE_VENDOR "Open-Agriculture") | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An ISO11783-6 Server") | ||
set(CPACK_PACKAGE_VERSION "1.3.0") | ||
set(CPACK_PACKAGE_VERSION_MAJOR "1") | ||
set(CPACK_PACKAGE_VERSION_MINOR "3") | ||
set(CPACK_PACKAGE_VERSION_PATCH "0") | ||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "AgISOVirtualTerminal") | ||
set(CPACK_COMPONENTS_ALL applications) | ||
set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "AgISOVirtualTerminal") | ||
set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION | ||
"A free and open source ISO11783-6 Server") | ||
set(CPACK_PACKAGE_CONTACT "[email protected]") | ||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_LIST_DIR}/LICENSE") | ||
set(CPACK_PACKAGE_EXECUTABLES "AgISOVirtualTerminal" "AgISOVirtualTerminal") | ||
set(CPACK_ALL_INSTALL_TYPES Full) | ||
set(CPACK_COMPONENT_LIBRARIES_INSTALL_TYPES Full) | ||
set(CPACK_COMPONENT_APPLICATIONS_INSTALL_TYPES Full) | ||
|
@@ -172,16 +203,16 @@ set(CPACK_NSIS_MUI_UNICON ${CPACK_NSIS_INSTALLED_ICON_NAME}) | |
set(CPACK_NSIS_DISPLAY_NAME "AgISOVirtualTerminal") | ||
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) | ||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT applications) | ||
include (InstallRequiredSystemLibraries) | ||
include(InstallRequiredSystemLibraries) | ||
|
||
if(APPLE) | ||
set(CPACK_GENERATOR DragNDrop ${CPACK_GENERATOR}) | ||
set(CPACK_GENERATOR "DragNDrop") | ||
set(CPACK_DMG_FORMAT "UDBZ") | ||
set(CPACK_DMG_VOLUME_NAME "${PROJECT_NAME}") | ||
set(CPACK_SYSTEM_NAME "OSX") | ||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}") | ||
set(CPACK_PACKAGE_ICON ${CPACK_NSIS_INSTALLED_ICON_NAME}) | ||
set(CPACK_GENERATOR DragNDrop ${CPACK_GENERATOR}) | ||
set(CPACK_GENERATOR "DragNDrop") | ||
set(CPACK_DMG_FORMAT "UDBZ") | ||
set(CPACK_DMG_VOLUME_NAME "${PROJECT_NAME}") | ||
set(CPACK_SYSTEM_NAME "OSX") | ||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}") | ||
set(CPACK_PACKAGE_ICON ${CPACK_NSIS_INSTALLED_ICON_NAME}) | ||
endif() | ||
|
||
# Must be after the last CPACK macros | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
if (NOT TARGET isobus::isobus) | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
CAN_Stack | ||
GIT_REPOSITORY https://github.com/Open-Agriculture/AgIsoStack-plus-plus.git | ||
GIT_TAG 67e231298f2ca8367d437d903e396aa3bcefe080 | ||
) | ||
FetchContent_MakeAvailable(CAN_Stack) | ||
if(NOT TARGET isobus::isobus) | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
CAN_Stack | ||
GIT_REPOSITORY https://github.com/Open-Agriculture/AgIsoStack-plus-plus.git | ||
GIT_TAG 67e231298f2ca8367d437d903e396aa3bcefe080) | ||
FetchContent_MakeAvailable(CAN_Stack) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
if (NOT TARGET JUCE::JUCE) | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
JUCE | ||
GIT_REPOSITORY https://github.com/juce-framework/JUCE.git | ||
GIT_TAG 7.0.8 | ||
) | ||
FetchContent_MakeAvailable(JUCE) | ||
if(NOT TARGET JUCE::JUCE) | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
JUCE | ||
GIT_REPOSITORY https://github.com/juce-framework/JUCE.git | ||
GIT_TAG 7.0.8) | ||
FetchContent_MakeAvailable(JUCE) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.