Skip to content
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

Change build environment from Visual Studio to CMake #14

Merged
merged 16 commits into from
Oct 18, 2024
Merged

Conversation

logmanoriginal
Copy link
Owner

This replaces the Visual Studio solution and project files for the extensions library with CMake build instructions. The build process is configured to automatically lookup the 'cintools' directory for the lowest version of LabVIEW installed on the build machine (requires LabVIEW 2013 or later).

This replaces the Visual Studio solution and project files for the
extensions library with CMake build instructions. The build process is
configured to automatically lookup the 'cintools' directory for the
lowest version of LabVIEW installed on the build machine (requires
LabVIEW 2013 or later).
@logmanoriginal logmanoriginal changed the title extensions: Change build environment from Visual Studio to CMake Change build environment from Visual Studio to CMake Oct 13, 2024
This utilizes FetchContent_Declare() and FetchContent_MakeAvailable() to
clone the libssh2 repository when configuring the project using CMake.
This avoids a nested if-statement to make the file more readable.
This allows users to invoke cmake from the project root and separates
extension-specific settings from project settings. (it also appears to
be best practice in other projects that utilize CMake)
This ensures that the library is always installed in the correct
location automatically.
This removes the need for the nested CMakeLists file to fetch and setup
the external dependencies and instead manages them from the root.
This adds a build step to also compile libssh2 from source when building
the CMake file, which ensures that the binaries are always compatible
and no files need to be copied manually. The build instructions are
updated accordingly.
This removes the pre-build DLLs in favor of the new cmake build system.

Important!
CMake, Git, and the build environment must now also be installed on the
developer machine and build agents.
This also adds links to the webpages for prerequisites.
This adds two new steps to the pipeline:
1) Prepare build configurations
2) Build libraries

The libraries are build with 'Debug' configuration to allow the agent to
utilize debug functions.

Note that this is different from the previous implementation which
always utilizes release builds.
Both 32-bit and 64-bit builds can utilize the same 'cintools' files,
regardless if the build is for 32 or 64 bit. We currently discover
the files base on the bitness, which does not work unless the host
has both 32 and 64 bit versions of LabVIEW installed.

This fixes the issue by always considering both 32 and 64 bit folders
when searching for 'cintools'.
This reverts commit a429ba4.

As it turns out, 'labview.lib' from cintools is specific to the bitness
of LabVIEW. This means that we cannot have only 32 or 64 bit installed
but need both.
@logmanoriginal logmanoriginal marked this pull request as ready for review October 17, 2024 18:24
LIBSSH2_COMMIT_HASH specifies the commit hash of the libssh2 repository
used for the build process. It also accepts branch names and tags.
However, the use of commit hashes is strongly recommended to avoid
pulling malicious code.

The default value is set to the commit hash of libssh2-1.11.0

This also updates azure-pipelines.yml to explicitly specify the commit
hash to use for the pipeline.
@logmanoriginal logmanoriginal merged commit 482e334 into main Oct 18, 2024
1 check passed
@logmanoriginal logmanoriginal deleted the cmake branch October 18, 2024 07:44
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.

1 participant