-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
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 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
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.
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back 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).