Skip to content

Commit

Permalink
update windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
admercs committed Feb 20, 2024
1 parent 477db0a commit 23557d1
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 62 deletions.
3 changes: 2 additions & 1 deletion cmake/AutonomyLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ project(AutonomyLib)

LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/../cmake-modules/CommonSetup.cmake")
CommonSetup()

CommonSetup()
IncludeEigen()

include_directories(
Expand All @@ -26,6 +26,7 @@ file(GLOB_RECURSE ${PROJECT_NAME}_sources
add_library(${PROJECT_NAME} STATIC ${${PROJECT_NAME}_sources})

CommonTargetLink()

target_link_libraries(${PROJECT_NAME} ${RPC_LIB})
target_link_libraries(${PROJECT_NAME} MavLinkCom)

Expand Down
5 changes: 2 additions & 3 deletions cmake/AutonomyLibUnitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ project(AutonomyLibUnitTests)

LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/../cmake-modules/CommonSetup.cmake")
CommonSetup()

CommonSetup()
IncludeEigen()

SetupConsoleBuild()

include_directories(
Expand All @@ -16,8 +15,8 @@ include_directories(
)

AddExecutableSource()

CommonTargetLink()

target_link_libraries(${PROJECT_NAME} AutonomyLib)
target_link_libraries(${PROJECT_NAME} MavLinkCom)
target_link_libraries(${PROJECT_NAME} ${RPC_LIB})
6 changes: 3 additions & 3 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.5.0)
project(AutonomySim)

add_subdirectory("rpclib_wrapper")
add_subdirectory("AutonomyLib")
add_subdirectory("MavLinkCom")
add_subdirectory("AutonomyLibUnitTests")
add_subdirectory("rpclib_wrapper")
add_subdirectory("MavLinkCom")
add_subdirectory("HelloCar")
add_subdirectory("HelloDrone")
add_subdirectory("HelloSpawnedDrones")
add_subdirectory("HelloCar")
add_subdirectory("DroneShell")
add_subdirectory("DroneServer")
5 changes: 2 additions & 3 deletions cmake/DroneServer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ project(DroneServer)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
include("${CMAKE_CURRENT_LIST_DIR}/../cmake-modules/CommonSetup.cmake")
CommonSetup()

CommonSetup()
IncludeEigen()

SetupConsoleBuild()

include_directories(
Expand All @@ -17,8 +16,8 @@ include_directories(
)

AddExecutableSource()

CommonTargetLink()

target_link_libraries(${PROJECT_NAME} AutonomyLib)
target_link_libraries(${PROJECT_NAME} MavLinkCom)
target_link_libraries(${PROJECT_NAME} ${RPC_LIB})
5 changes: 2 additions & 3 deletions cmake/DroneShell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ project(DroneShell)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
include("${CMAKE_CURRENT_LIST_DIR}/../cmake-modules/CommonSetup.cmake")
CommonSetup()

CommonSetup()
IncludeEigen()

SetupConsoleBuild()

include_directories(
Expand All @@ -18,7 +17,7 @@ include_directories(
)

AddExecutableSource()

CommonTargetLink()

target_link_libraries(${PROJECT_NAME} AutonomyLib)
target_link_libraries(${PROJECT_NAME} ${RPC_LIB})
7 changes: 3 additions & 4 deletions cmake/HelloCar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ project(HelloCar)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
include("${CMAKE_CURRENT_LIST_DIR}/../cmake-modules/CommonSetup.cmake")
CommonSetup()

CommonSetup()
IncludeEigen()

SetupConsoleBuild()

## Specify additional locations of header files
Expand All @@ -18,8 +17,8 @@ include_directories(
${AUTONOMYSIM_ROOT}/MavLinkCom/common_utils
)

AddExecutableSource()

AddExecutableSource()
CommonTargetLink()

target_link_libraries(${PROJECT_NAME} AutonomyLib)
target_link_libraries(${PROJECT_NAME} ${RPC_LIB})
7 changes: 3 additions & 4 deletions cmake/HelloDrone/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ project(HelloDrone)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
include("${CMAKE_CURRENT_LIST_DIR}/../cmake-modules/CommonSetup.cmake")
CommonSetup()

CommonSetup()
IncludeEigen()

SetupConsoleBuild()

## Specify additional locations of header files
Expand All @@ -18,8 +17,8 @@ include_directories(
${AUTONOMYSIM_ROOT}/MavLinkCom/common_utils
)

AddExecutableSource()

AddExecutableSource()
CommonTargetLink()

target_link_libraries(${PROJECT_NAME} AutonomyLib)
target_link_libraries(${PROJECT_NAME} ${RPC_LIB})
7 changes: 3 additions & 4 deletions cmake/HelloSpawnedDrones/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ project(HelloSpawnedDrones)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
include("${CMAKE_CURRENT_LIST_DIR}/../cmake-modules/CommonSetup.cmake")
CommonSetup()

CommonSetup()
IncludeEigen()

SetupConsoleBuild()

## Specify additional locations of header files
Expand All @@ -18,8 +17,8 @@ include_directories(
${AUTONOMYSIM_ROOT}/MavLinkCom/common_utils
)

AddExecutableSource()

AddExecutableSource()
CommonTargetLink()

target_link_libraries(${PROJECT_NAME} AutonomyLib)
target_link_libraries(${PROJECT_NAME} ${RPC_LIB})
1 change: 1 addition & 0 deletions cmake/MavLinkCom/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ add_subdirectory("MavLinkTest")

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
include("${CMAKE_CURRENT_LIST_DIR}/../cmake-modules/CommonSetup.cmake")

CommonSetup()

include_directories(
Expand Down
1 change: 1 addition & 0 deletions cmake/rpclib_wrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project(rpclib_wrapper)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
include("${CMAKE_CURRENT_LIST_DIR}/../cmake-modules/CommonSetup.cmake")

CommonSetup()

if(UNIX)
Expand Down
22 changes: 11 additions & 11 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@ param(

# NOTE: Prefer Import-Module to Get-Content for its scoping rules

# Common utilities:
# Add-Directories, Remove-Directories, Invoke-Fail, Test-WorkingDirectory, Test-VariableDefined,
# Get-EnvVariables, Get-ProgramVersion, Get-VersionMajorMinor, Get-VersionMajorMinorBuild,
# Get-WindowsInfo, Get-WindowsVersion, Get-Architecture, Get-ArchitectureWidth, Set-ProcessorCount
Import-Module "${PWD}\scripts\utils.psm1"
# Common utilities
Import-Module "${PWD}\scripts\utils.psm1" # imports: Add-Directories, Remove-Directories, Invoke-Fail, Test-WorkingDirectory,
# Test-VariableDefined, Get-EnvVariables, Get-ProgramVersion, Get-VersionMajorMinor,
# Get-VersionMajorMinorBuild, Get-WindowsInfo, Get-WindowsVersion, Get-Architecture,
# Get-ArchitectureWidth, Set-ProcessorCount

# Documentation
Import-Module "${PWD}\scripts\build_docs.psm1" # imports: Build-Documentation
Import-Module "${PWD}\scripts\build_docs.psm1" # imports: Build-Documentation

# Tests
Import-Module "${PWD}\scripts\test_visualstudio.psm1" # imports: VS_VERSION_MINIMUM, Set-VsInstance, Get-VsInstanceVersion, Test-VisualStudioVersion
Import-Module "${PWD}\scripts\test_cmake.psm1" # imports: CMAKE_VERSION_MINIMUM, Test-CmakeVersion
Import-Module "${PWD}\scripts\test_rpclib.psm1" # imports: RPCLIB_VERSION, Test-RpcLibVersion
Import-Module "${PWD}\scripts\test_eigen.psm1" # imports: EIGEN_VERSION, Test-EigenVersion
Import-Module "${PWD}\scripts\test_unrealasset.psm1" # imports: ASSET_SUV_VERSION, Test-AssetSuvVersion
Import-Module "${PWD}\scripts\test_visualstudio.psm1" # imports: VS_VERSION_MINIMUM, Set-VsInstance, Get-VsInstanceVersion, Test-VisualStudioVersion
Import-Module "${PWD}\scripts\test_cmake.psm1" # imports: CMAKE_VERSION_MINIMUM, Test-CmakeVersion
Import-Module "${PWD}\scripts\test_rpclib.psm1" # imports: RPCLIB_VERSION, Test-RpcLibVersion
Import-Module "${PWD}\scripts\test_eigen.psm1" # imports: EIGEN_VERSION, Test-EigenVersion
Import-Module "${PWD}\scripts\test_unrealasset.psm1" # imports: ASSET_SUV_VERSION, Test-AssetSuvVersion

###
### Variables
Expand Down
12 changes: 6 additions & 6 deletions scripts/test_cmake.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ NOTES:
### Imports
###

# Common utilities:
# Add-Directories, Remove-Directories, Invoke-Fail, Test-WorkingDirectory, Test-VariableDefined,
# Get-EnvVariables, Get-ProgramVersion, Get-VersionMajorMinor, Get-VersionMajorMinorBuild,
# Get-WindowsInfo, Get-WindowsVersion, Get-Architecture, Get-ArchitectureWidth, Set-ProcessorCount
Import-Module "${PWD}\scripts\utils.psm1"
# Common utilities
Import-Module "${PWD}\scripts\utils.psm1" # imports: Add-Directories, Remove-Directories, Invoke-Fail, Test-WorkingDirectory,
# Test-VariableDefined, Get-EnvVariables, Get-ProgramVersion, Get-VersionMajorMinor,
# Get-VersionMajorMinorBuild, Get-WindowsInfo, Get-WindowsVersion, Get-Architecture,
# Get-ArchitectureWidth, Set-ProcessorCount

###
### Variables
Expand All @@ -47,7 +47,7 @@ function Install-Cmake {
$VersionMajMinBuild = Get-VersionMajorMinorBuild $Version
$Installer = "cmake-${VersionMajMinBuild}-x86_64.msi"
Invoke-WebRequest "https://cmake.org/files/v${VersionMajMin}/${Installer}" -OutFile "temp\${Installer}"
Start-Process -FilePath "temp\${Installer}" -Wait
Start-Process -FilePath "temp\${Installer}" -Wait -NoNewWindow
Remove-Item -Path "temp\${Installer}"
}
else {
Expand Down
10 changes: 5 additions & 5 deletions scripts/test_eigen.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ NOTES:
### Imports
###

# Common utilities:
# Add-Directories, Remove-Directories, Invoke-Fail, Test-WorkingDirectory, Test-VariableDefined,
# Get-EnvVariables, Get-ProgramVersion, Get-VersionMajorMinor, Get-VersionMajorMinorBuild,
# Get-WindowsInfo, Get-WindowsVersion, Get-Architecture, Get-ArchitectureWidth, Set-ProcessorCount
Import-Module "${PWD}\scripts\utils.psm1"
# Common utilities
Import-Module "${PWD}\scripts\utils.psm1" # imports: Add-Directories, Remove-Directories, Invoke-Fail, Test-WorkingDirectory,
# Test-VariableDefined, Get-EnvVariables, Get-ProgramVersion, Get-VersionMajorMinor,
# Get-VersionMajorMinorBuild, Get-WindowsInfo, Get-WindowsVersion, Get-Architecture,
# Get-ArchitectureWidth, Set-ProcessorCount

###
### Variables
Expand Down
10 changes: 5 additions & 5 deletions scripts/test_rpclib.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ NOTES:
### Imports
###

# Common utilities:
# Add-Directories, Remove-Directories, Invoke-Fail, Test-WorkingDirectory, Test-VariableDefined,
# Get-EnvVariables, Get-ProgramVersion, Get-VersionMajorMinor, Get-VersionMajorMinorBuild,
# Get-WindowsInfo, Get-WindowsVersion, Get-Architecture, Get-ArchitectureWidth, Set-ProcessorCount
Import-Module "${PWD}\scripts\utils.psm1"
# Common utilities
Import-Module "${PWD}\scripts\utils.psm1" # imports: Add-Directories, Remove-Directories, Invoke-Fail, Test-WorkingDirectory,
# Test-VariableDefined, Get-EnvVariables, Get-ProgramVersion, Get-VersionMajorMinor,
# Get-VersionMajorMinorBuild, Get-WindowsInfo, Get-WindowsVersion, Get-Architecture,
# Get-ArchitectureWidth, Set-ProcessorCount

###
### Variables
Expand Down
10 changes: 5 additions & 5 deletions scripts/test_unrealasset.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ NOTES:
### Imports
###

# Common utilities:
# Add-Directories, Remove-Directories, Invoke-Fail, Test-WorkingDirectory, Test-VariableDefined,
# Get-EnvVariables, Get-ProgramVersion, Get-VersionMajorMinor, Get-VersionMajorMinorBuild,
# Get-WindowsInfo, Get-WindowsVersion, Get-Architecture, Get-ArchitectureWidth, Set-ProcessorCount
Import-Module "${PWD}\scripts\utils.psm1"
# Common utilities
Import-Module "${PWD}\scripts\utils.psm1" # imports: Add-Directories, Remove-Directories, Invoke-Fail, Test-WorkingDirectory,
# Test-VariableDefined, Get-EnvVariables, Get-ProgramVersion, Get-VersionMajorMinor,
# Get-VersionMajorMinorBuild, Get-WindowsInfo, Get-WindowsVersion, Get-Architecture,
# Get-ArchitectureWidth, Set-ProcessorCount

###
### Variables
Expand Down
10 changes: 5 additions & 5 deletions scripts/test_visualstudio.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ NOTES:
### Imports
###

# Common utilities:
# Add-Directories, Remove-Directories, Invoke-Fail, Test-WorkingDirectory, Test-VariableDefined,
# Get-EnvVariables, Get-ProgramVersion, Get-VersionMajorMinor, Get-VersionMajorMinorBuild,
# Get-WindowsInfo, Get-WindowsVersion, Get-Architecture, Get-ArchitectureWidth, Set-ProcessorCount
Import-Module "${PWD}\scripts\utils.psm1"
# Common utilities
Import-Module "${PWD}\scripts\utils.psm1" # imports: Add-Directories, Remove-Directories, Invoke-Fail, Test-WorkingDirectory,
# Test-VariableDefined, Get-EnvVariables, Get-ProgramVersion, Get-VersionMajorMinor,
# Get-VersionMajorMinorBuild, Get-WindowsInfo, Get-WindowsVersion, Get-Architecture,
# Get-ArchitectureWidth, Set-ProcessorCount

###
### Variables
Expand Down

0 comments on commit 23557d1

Please sign in to comment.