Skip to content

Automated windows build: build.bat #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexandernikolic-v2c2
Copy link

Some libraries have different names/case in vcpkg (for windows). Added copying of XML file to TARGET_FILE_DIR for master examples.

in folder dependencies:

  • vcpkg will be installed locally - user has to click no button to not install systemwide.
  • cmake will be downloaded and unzipped

DCPLib and all examples will be built.
Simple test will be run at end of build.

Some libraries have different names/case in vcpkg (for windows).
Added copying of XML file to TARGET_FILE_DIR for master examples.

in folder dependencies:
  * vcpkg will be installed locally - user has to click no button to not install systemwide.
  * cmake will be downloaded and unzipped

DCPLib and all examples will be built.
Simple test will be run at end of build.
@@ -40,7 +40,12 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/core DESTINATION include/DCPLib)

if(BUILD_ALL OR BUILD_ETHERNET)
find_package(Threads REQUIRED)
find_package(ASIO REQUIRED )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is ASIO on windows not ok?
We use ASIO on windows with vcpkg here https://github.com/eclipse-openmcx/openmcx/blob/add_dcp_support/CMakeLists.txt and don't have any problems.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TL;DR: This change (+ if/else and "case-sensitive" asio find_package calls) can be omitted.

This is me being used to case-paranoia, thus my bad.

As I read this information in the output of vcpkg:

asio provides CMake targets:

  # this is heuristically generated, and may not be correct
  find_package(asio CONFIG REQUIRED)
  target_link_libraries(main PRIVATE asio::asio)

asio provides pkg-config modules:

  # A cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach.
  asio

I assumed by using the same case as output, I would also make sure to use the vcpkg-provided pkg-config modules. This is not the case though, as pkg-config is not used in CMakeLists.txt - I missed to see that.

Masking cmake/FindASIO.cmake by renaming revealed, that this file is used. To reduce future maintenance burden, removing this file and using the pkg-config way in cmake might be considered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants