-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from RoboStack/win-build
Trigger windows builds
- Loading branch information
Showing
16 changed files
with
382 additions
and
6 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 7863ddb..5f361df 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -32,6 +32,8 @@ include(IceoryxPoshDeployment) | ||
|
||
if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin) | ||
option(BUILD_SHARED_LIBS "Create shared libraries by default" ON) | ||
+else() | ||
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) | ||
endif() | ||
|
||
set(PREFIX iceoryx/v${CMAKE_PROJECT_VERSION}) |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/iceoryx_dds/CMakeLists.txt b/iceoryx_dds/CMakeLists.txt | ||
index ae1f9f83f..e79873a72 100644 | ||
--- a/iceoryx_dds/CMakeLists.txt | ||
+++ b/iceoryx_dds/CMakeLists.txt | ||
@@ -16,6 +16,10 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
+if(WIN32) | ||
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) | ||
+endif() | ||
+ | ||
set(IOX_VERSION_STRING "2.0.6") | ||
|
||
project(iceoryx_dds VERSION ${IOX_VERSION_STRING}) |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index f7cb43b..115964a 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -26,6 +26,8 @@ include("${CMAKE_CURRENT_LIST_DIR}/cmake/IceoryxPlatform.cmake") | ||
|
||
if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin) | ||
option(BUILD_SHARED_LIBS "Create shared libraries by default" ON) | ||
+else() | ||
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) | ||
endif() | ||
|
||
set(PREFIX iceoryx/v${CMAKE_PROJECT_VERSION}) |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
diff --git a/iceoryx_posh/CMakeLists.txt b/iceoryx_posh/CMakeLists.txt | ||
index 57e84cdd0..d7781cbb9 100644 | ||
--- a/iceoryx_posh/CMakeLists.txt | ||
+++ b/iceoryx_posh/CMakeLists.txt | ||
@@ -42,6 +42,8 @@ include(cmake/IceoryxPoshDeployment.cmake) | ||
|
||
if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin) | ||
option(BUILD_SHARED_LIBS "Create shared libraries by default" ON) | ||
+else() | ||
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) | ||
endif() | ||
|
||
set(PREFIX iceoryx/v${CMAKE_PROJECT_VERSION}) | ||
diff --git a/iceoryx_posh/cmake/cpptoml/CMakeLists.txt b/iceoryx_posh/cmake/cpptoml/CMakeLists.txt | ||
index e770e4fdba..a548376f1a 100644 | ||
--- a/iceoryx_posh/cmake/cpptoml/CMakeLists.txt | ||
+++ b/iceoryx_posh/cmake/cpptoml/CMakeLists.txt | ||
@@ -75,23 +75,13 @@ if(DEFINED CMAKE_TOOLCHAIN_FILE) | ||
endif() | ||
|
||
execute_process( | ||
- COMMAND git apply -R -p1 --ignore-space-change --whitespace=nowarn --check | ||
+ COMMAND patch -p1 --forward --ignore-whitespace --fuzz=3 | ||
INPUT_FILE "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch" | ||
WORKING_DIRECTORY "${SOURCE_DIR}" | ||
- OUTPUT_QUIET | ||
- ERROR_QUIET | ||
RESULT_VARIABLE result) | ||
-if(result) | ||
- message(STATUS "Applying patch for minimal cmake version to cpptoml") | ||
|
||
- execute_process( | ||
- COMMAND git apply -p1 --ignore-space-change --whitespace=nowarn | ||
- INPUT_FILE "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch" | ||
- WORKING_DIRECTORY "${SOURCE_DIR}" | ||
- RESULT_VARIABLE result) | ||
- if(result) | ||
- message(FATAL_ERROR "CMake step [patch] for '${PROJECT_NAME}' failed! Error code: ${result}!") | ||
- endif() | ||
+if(result) | ||
+ message(FATAL_ERROR "CMake step [patch] for '${PROJECT_NAME}' failed! Error code: ${result}!") | ||
endif() | ||
|
||
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" "-DENABLE_LIBCXX=off" "-DCPPTOML_BUILD_EXAMPLES=off" "-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}" "${SOURCE_DIR}" ${CMAKE_ADDITIONAL_OPTIONS} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/ros_gz_bridge/CMakeLists.txt b/ros_gz_bridge/CMakeLists.txt | ||
index 44911577..76779457 100644 | ||
--- a/ros_gz_bridge/CMakeLists.txt | ||
+++ b/ros_gz_bridge/CMakeLists.txt | ||
@@ -11,4 +11,7 @@ if(NOT CMAKE_CXX_STANDARD) | ||
+elseif(MSVC) | ||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") | ||
endif() | ||
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) | ||
|
||
find_package(ament_cmake REQUIRED) | ||
find_package(rclcpp REQUIRED) |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
diff --git a/ros_gz_sim/CMakeLists.txt b/ros_gz_sim/CMakeLists.txt | ||
index dc8deb03..ec6ac678 100644 | ||
--- a/ros_gz_sim/CMakeLists.txt | ||
+++ b/ros_gz_sim/CMakeLists.txt | ||
@@ -12,3 +12,4 @@ endif() | ||
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) | ||
|
||
find_package(ament_cmake REQUIRED) | ||
find_package(rclcpp REQUIRED) |
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index f2ed31b..50b5843 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -4,7 +4,7 @@ project(ros_workspace NONE) | ||
find_package(ament_cmake_core REQUIRED) | ||
|
||
# Collect current python 3 version | ||
-execute_process(COMMAND python3 -c "from distutils import sysconfig; print(sysconfig.get_python_version())" OUTPUT_VARIABLE PYTHON_MAJOR_MINOR OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
+find_package (Python COMPONENTS Interpreter Development) | ||
|
||
# Locate ament_package template files. | ||
if(WIN32) | ||
@@ -14,7 +14,15 @@ else() | ||
set(PYTHON_INSTALL_DIR "lib/python${PYTHON_MAJOR_MINOR}/site-packages") | ||
set(SHELL_EXT "sh") | ||
endif() | ||
-set(AMENT_PACKAGE_DIR "${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_DIR}/ament_package") | ||
+set(AMENT_PACKAGE_DIR "${Python_SITELIB}/ament_package") | ||
+ | ||
+if(NOT EXISTS "${AMENT_PACKAGE_DIR}" AND "$ENV{CONDA_BUILD_CROSS_COMPILATION}" EQUAL "1") | ||
+ message(WARNING "Could not find '${AMENT_PACKAGE_DIR}'. Replace '$ENV{PREFIX}' with '$ENV{BUILD_PREFIX}'.") | ||
+ string(REPLACE "$ENV{PREFIX}" "$ENV{BUILD_PREFIX}" AMENT_PACKAGE_DIR_REP ${AMENT_PACKAGE_DIR}) | ||
+ set(AMENT_PACKAGE_DIR "${AMENT_PACKAGE_DIR_REP}") | ||
+ message(WARNING "Now try '${AMENT_PACKAGE_DIR}'.") | ||
+endif() | ||
+ | ||
if(NOT EXISTS "${AMENT_PACKAGE_DIR}") | ||
# Check for an .egg-link file and use the listed directory if it exists | ||
get_filename_component(AMENT_PACKAGE_EGG_LINK "${AMENT_PACKAGE_DIR}" DIRECTORY) | ||
@@ -38,28 +46,7 @@ set( | ||
"prepend-non-duplicate;PYTHONPATH;${PYTHON_INSTALL_DIR}") | ||
|
||
# Set environment hooks for default environment. | ||
-if(WIN32) | ||
- ament_environment_hooks("${PYTHONPATH_HOOK}") | ||
-else() | ||
- set(LIBRARY_PATH_HOOK "${AMENT_PACKAGE_TEMPLATE_DIR}/environment_hook/library_path.${SHELL_EXT}") | ||
- # enable C language so that a trycompile can determine what the | ||
- # anticipated libdir will be. | ||
- enable_language(C) | ||
- include(GNUInstallDirs) | ||
- if(NOT ${CMAKE_INSTALL_LIBDIR} STREQUAL "lib") | ||
- # register multiarch information for .dsv generation | ||
- if(APPLE) | ||
- set(LIBRARY_PATH_ENV_VAR "DYLD_LIBRARY_PATH") | ||
- else() | ||
- set(LIBRARY_PATH_ENV_VAR "LD_LIBRARY_PATH") | ||
- endif() | ||
- set( | ||
- AMENT_CMAKE_ENVIRONMENT_HOOKS_DESC_multiarch_library_paths | ||
- "prepend-non-duplicate;${LIBRARY_PATH_ENV_VAR};${CMAKE_INSTALL_LIBDIR}") | ||
- set(MULTIARCH_LIBRARY_PATH_HOOK "env-hooks/multiarch_library_paths.sh.in") | ||
- endif() | ||
- ament_environment_hooks("${LIBRARY_PATH_HOOK}" "${PYTHONPATH_HOOK}" ${MULTIARCH_LIBRARY_PATH_HOOK}) | ||
-endif() | ||
+ament_environment_hooks("${BINARY_PATH_HOOK}" "${PYTHONPATH_HOOK}") | ||
|
||
# skip using ament_index/resource_index/parent_prefix_path | ||
# if for Debian packages it is known that there are no underlays | ||
|
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 |
---|---|---|
@@ -0,0 +1,170 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 67612f0..355d45e 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -23,10 +23,10 @@ find_package(std_msgs REQUIRED) | ||
|
||
find_package(OpenCV REQUIRED imgproc) | ||
find_package(PkgConfig) | ||
-pkg_check_modules(PC_OGG REQUIRED ogg) | ||
-pkg_check_modules(PC_THEORA REQUIRED theora) | ||
-pkg_check_modules(PC_THEORAENC REQUIRED theoraenc) | ||
-pkg_check_modules(PC_THEORADEC REQUIRED theoradec) | ||
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) | ||
+ | ||
+find_package(OGG REQUIRED) | ||
+find_package(THEORA REQUIRED) | ||
|
||
rosidl_generate_interfaces(${PROJECT_NAME} | ||
"msg/Packet.msg" | ||
@@ -55,13 +55,13 @@ target_compile_definitions(${LIBRARY_NAME} PRIVATE | ||
target_include_directories(${LIBRARY_NAME} PRIVATE | ||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" | ||
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>" | ||
-) | ||
+ ${THEORA_INCLUDE_DIRS} | ||
+ ${OGG_INCLUDE_DIRS}) | ||
+ | ||
target_link_libraries(${LIBRARY_NAME} | ||
opencv_imgproc | ||
- ${PC_OGG_LIBRARIES} | ||
- ${PC_THEORA_LIBRARIES} | ||
- ${PC_THEORAENC_LIBRARIES} | ||
- ${PC_THEORADEC_LIBRARIES} | ||
+ ${OGG_LIBRARIES} | ||
+ ${THEORA_LIBRARIES} | ||
"${cpp_typesupport_target}" | ||
${sensor_msgs_TARGETS} | ||
cv_bridge::cv_bridge | ||
@@ -71,20 +71,13 @@ target_link_libraries(${LIBRARY_NAME} | ||
) | ||
|
||
add_executable(ogg_saver src/ogg_saver.cpp) | ||
-target_compile_definitions(ogg_saver PRIVATE | ||
- ${PC_OGG_CFLAGS_OTHER} | ||
- ${PC_THEORA_CFLAGS_OTHER} | ||
- ${PC_THEORAENC_CFLAGS_OTHER} | ||
- ${PC_THEORADEC_CFLAGS_OTHER} | ||
-) | ||
-target_link_libraries(ogg_saver | ||
- ${PC_THEORA_LIBRARY} | ||
- ${PC_OGG_LIBRARY} | ||
- ${PC_THEORAENC_LIBRARIES} | ||
- ${PC_THEORADEC_LIBRARIES} | ||
- "${cpp_typesupport_target}" | ||
- rclcpp::rclcpp | ||
- rcutils::rcutils | ||
+ | ||
+target_link_libraries(ogg_saver ${THEORA_LIBRARIES} | ||
+ ${OGG_LIBRARIES} | ||
+ ${OpenCV_LIBRARIES} | ||
+ "${cpp_typesupport_target}" | ||
+ rclcpp::rclcpp | ||
+ rcutils::rcutils | ||
) | ||
|
||
ament_export_dependencies( | ||
diff --git a/cmake/FindOGG.cmake b/cmake/FindOGG.cmake | ||
new file mode 100644 | ||
index 0000000..3121d17 | ||
--- /dev/null | ||
+++ b/cmake/FindOGG.cmake | ||
@@ -0,0 +1,26 @@ | ||
+find_path(OGG_INCLUDE_DIR | ||
+ NAMES | ||
+ ogg/ogg.h | ||
+ DOC "ogg include directory") | ||
+mark_as_advanced(OGG_INCLUDE_DIR) | ||
+ | ||
+find_library(OGG_LIBRARY | ||
+ NAMES | ||
+ ogg | ||
+ DOC "ogg library") | ||
+mark_as_advanced(OGG_LIBRARY) | ||
+ | ||
+include(FindPackageHandleStandardArgs) | ||
+find_package_handle_standard_args(OGG REQUIRED_VARS OGG_LIBRARY OGG_INCLUDE_DIR) | ||
+ | ||
+if (OGG_FOUND) | ||
+ set(OGG_LIBRARIES "${OGG_LIBRARY}") | ||
+ set(OGG_INCLUDE_DIRS "${OGG_INCLUDE_DIR}") | ||
+ | ||
+ if (NOT TARGET OGG::OGG) | ||
+ add_library(OGG::OGG UNKNOWN IMPORTED) | ||
+ set_target_properties(OGG::OGG PROPERTIES | ||
+ IMPORTED_LOCATION "${OGG_LIBRARY}" | ||
+ INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIR}") | ||
+ endif () | ||
+endif () | ||
diff --git a/cmake/FindTHEORA.cmake b/cmake/FindTHEORA.cmake | ||
new file mode 100644 | ||
index 0000000..b69dd2c | ||
--- /dev/null | ||
+++ b/cmake/FindTHEORA.cmake | ||
@@ -0,0 +1,66 @@ | ||
+include(CMakeFindDependencyMacro) | ||
+ | ||
+find_path(THEORA_INCLUDE_DIR | ||
+ NAMES | ||
+ theora/theora.h | ||
+ DOC "theora include directory") | ||
+mark_as_advanced(THEORA_INCLUDE_DIR) | ||
+ | ||
+get_filename_component(computed_theora_root "${THEORA_INCLUDE_DIR}" DIRECTORY) | ||
+ | ||
+find_library(THEORA_LIBRARY | ||
+ NAMES | ||
+ theora | ||
+ HINTS | ||
+ "${computed_theora_root}/lib" | ||
+ "${computed_theora_root}/lib64" | ||
+ DOC "theora library") | ||
+mark_as_advanced(THEORA_LIBRARY) | ||
+ | ||
+find_library(THEORA_enc_LIBRARY | ||
+ NAMES | ||
+ theoraenc | ||
+ HINTS | ||
+ "${computed_theora_root}/lib" | ||
+ "${computed_theora_root}/lib64" | ||
+ DOC "theora encoding library") | ||
+mark_as_advanced(THEORA_enc_LIBRARY) | ||
+ | ||
+find_library(THEORA_dec_LIBRARY | ||
+ NAMES | ||
+ theoradec | ||
+ HINTS | ||
+ "${computed_theora_root}/lib" | ||
+ "${computed_theora_root}/lib64" | ||
+ DOC "theora decoding library") | ||
+mark_as_advanced(THEORA_dec_LIBRARY) | ||
+ | ||
+include(FindPackageHandleStandardArgs) | ||
+find_package_handle_standard_args(THEORA | ||
+ REQUIRED_VARS THEORA_LIBRARY THEORA_enc_LIBRARY THEORA_dec_LIBRARY THEORA_INCLUDE_DIR) | ||
+ | ||
+if (THEORA_FOUND) | ||
+ set(THEORA_LIBRARIES "${THEORA_LIBRARY}" "${THEORA_enc_LIBRARY}" "${THEORA_dec_LIBRARY}") | ||
+ set(THEORA_INCLUDE_DIRS "${THEORA_INCLUDE_DIR}") | ||
+ | ||
+ if (NOT TARGET THEORA::THEORA) | ||
+ add_library(THEORA::THEORA UNKNOWN IMPORTED) | ||
+ set_target_properties(THEORA::THEORA PROPERTIES | ||
+ IMPORTED_LOCATION "${THEORA_LIBRARY}" | ||
+ INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}) | ||
+ endif () | ||
+ | ||
+ if (NOT TARGET THEORA::ENC) | ||
+ add_library(THEORA::ENC UNKNOWN IMPORTED) | ||
+ set_target_properties(THEORA::ENC PROPERTIES | ||
+ IMPORTED_LOCATION "${THEORA_enc_LIBRARY}" | ||
+ INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}) | ||
+ endif() | ||
+ | ||
+ if (NOT TARGET THEORA::DEC) | ||
+ add_library(THEORA::DEC UNKNOWN IMPORTED) | ||
+ set_target_properties(THEORA::DEC PROPERTIES | ||
+ IMPORTED_LOCATION "${THEORA_dec_LIBRARY}" | ||
+ INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}) | ||
+ endif() | ||
+endif () |
Oops, something went wrong.