Plcncli with external 3rd party library and CMAKE_PREFIX_PATH

Hi,
I’m trying to get plcncli to find my 3rd party libraries in the external folder or its subfolders.
According to the examples it should find the best matching folder automatically:

The CLI will automatically set the CMAKE_PREFIX_PATH to find CMake packages to
this directory or a sub-directory of this directory. To decide which directory
to use for the CMAKE_PREFIX_PATH the CLI looks for a directory with the name
<target_name>_<target_version>.
To choose such a directory the target_name must match the current build target
name and the version must be lower or equal to the current build target
version. If such a directory is found the CLI looks whether the directory
contains the current build type (Release, Debug, ...). If no such directory is
found it looks for a directory named "Release".
If the CLI finds the build type directory or the "Release" directory it uses
this directory as CMAKE_PREFIX_PATH. If not it uses as fallback the found
target specific directory. If that is not found it uses the external directory.
If the CMAKE_PREFIX_PATH is already set by a command line option it will not
override the set value.
Please make sure that if the libraries which are used by this project use other
libraries themself, that the library must have the RPATH set to $ORIGIN.
I have tried various different versions of "<target_name>_<target_version>", see the symlinks in my 'external' folder below, and those contain a 'Release' subfolder.
lrwxrwxrwx 1 root root  22 Feb 27 14:29 AXCF1152_2023.0.7 -> AXCF1152_2023.0.7.109/
lrwxrwxrwx 1 root root  56 Feb 27 14:32 'AXCF1152_2023.0.7 LTS (23.0.7.109)' -> 'AXCF1152_2023.0.7.109/AXCF1152_2023.0.7 LTS (23.0.7.109)'
drwxr-xr-x 3 root root 4096 Feb 27 14:19 AXCF1152_2023.0.7.109
The documentation could be more clear, an example would really help. :)
But my build always fails because find_package can't find the dependencies.
My CMakeCache.txt will point to external, the fallback.
//No help, variable specified on the command line.
CMAKE_PREFIX_PATH:UNINITIALIZED=/workspaces/projectname/external
If I specify the path manually, it works.
plcncli build -t AXCF1152 --configure -- -DCMAKE_PREFIX_PATH=/workspaces/projectname/external/AXCF1152_2023.0.7.109/Release/
The CMakeCache.txt shows
//No help, variable specified on the command line.
CMAKE_PREFIX_PATH:UNINITIALIZED=/workspaces/projectname/external/AXCF1152_2023.0.7/Release/

What am I missing? Any suggestions appreciated.
plcncli 24.0.0.5077 (24.0.0.5077)

Current master for plcncli doesn’t have this bug.
Can’t comment on whether 2024.6 solves this already. Haven’t tried that.

Reopened this because I still can’t get it work after updating to plcncli 2025.0.0

Generating all files for /workspaces/project_plcnext.
[cmake]: CMake Error at CMakeLists.txt:93 (find_package):
[cmake]:   By not providing "Findasio.cmake" in CMAKE_MODULE_PATH this project has
[cmake]:   asked CMake to find a package configuration file provided by "asio", but
[cmake]:   CMake did not find one.
[cmake]: 
[cmake]:   Could not find a package configuration file provided by "asio" with any of
[cmake]:   the following names:
[cmake]: 
[cmake]:     asioConfig.cmake
[cmake]:     asio-config.cmake
[cmake]: 
[cmake]:   Add the installation prefix of "asio" to CMAKE_PREFIX_PATH or set
[cmake]:   "asio_DIR" to a directory containing one of the above files.  If "asio"
[cmake]:   provides a separate development package or SDK, be sure it has been
[cmake]:   installed.
[cmake]: 
[cmake]: 
[cmake]: CMake Error at CMakeLists.txt:93 (find_package):
[cmake]:   By not providing "Findasio.cmake" in CMAKE_MODULE_PATH this project has
[cmake]:   asked CMake to find a package configuration file provided by "asio", but
[cmake]:   CMake did not find one.
[cmake]: -- Configuring incomplete, errors occurred!
[cmake]: 
[cmake]:   Could not find a package configuration file provided by "asio" with any of
[cmake]:   the following names:
[cmake]: 
[cmake]:     asioConfig.cmake
[cmake]:     asio-config.cmake
[cmake]: 
[cmake]:   Add the installation prefix of "asio" to CMAKE_PREFIX_PATH or set
[cmake]:   "asio_DIR" to a directory containing one of the above files.  If "asio"
[cmake]:   provides a separate development package or SDK, be sure it has been
[cmake]:   installed.
[cmake]: 
[cmake]: 
Successfully generated all files for /workspaces/project_plcnext.
 *  Terminal will be reused by tasks, press any key to close it. 
 *  Executing task: source set_env.sh && plcncli build -t ${TARGET_SDK} --configure 
Requested build for targets AXCF1152,23.0.7.109
Starting build for target AXCF1152,23.0.7.109
Checking if CMake needs to be reconfigured...
Configuring CMake...
[cmake]: -- Setting ARP_TOOLCHAIN_NATIVE_SYSROOT='/SDK/sysroots/x86_64-pokysdk-linux'
[cmake]: -- Setting ARP_TOOLCHAIN_TARGET_SYSROOT='/SDK/sysroots/cortexa9t2hf-neon-pxc-linux-gnueabi'
[cmake]: -- Setting ARP_TOOLCHAIN_ENVIRONMENT_PATH='/vscode/vscode-server/bin/linux-x64/384ff7382de624fb94dbaf6da11977bba1ecd427/bin/remote-cli:/opt/conan/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin;/SDK/sysroots/x86_64-pokysdk-linux/usr/bin'
[cmake]: -- The C compiler identification is GNU 11.3.0
[cmake]: -- The CXX compiler identification is GNU 11.3.0
[cmake]: -- Detecting C compiler ABI info
[cmake]: -- Detecting C compiler ABI info - done
[cmake]: -- Check for working C compiler: /SDK/sysroots/x86_64-pokysdk-linux/usr/bin/arm-pxc-linux-gnueabi/arm-pxc-linux-gnueabi-gcc - skipped
[cmake]: -- Detecting C compile features
[cmake]: -- Detecting C compile features - done
[cmake]: -- Detecting CXX compiler ABI info
[cmake]: -- Detecting CXX compiler ABI info - done
[cmake]: -- Check for working CXX compiler: /SDK/sysroots/x86_64-pokysdk-linux/usr/bin/arm-pxc-linux-gnueabi/arm-pxc-linux-gnueabi-g++ - skipped
[cmake]: -- Detecting CXX compile features
[cmake]: -- Detecting CXX compile features - done
[cmake]: -- Found ArpProgramming: /SDK/sysroots/cortexa9t2hf-neon-pxc-linux-gnueabi/usr/include/plcnext  
[cmake]: -- Configuring incomplete, errors occurred!
[cmake]: CMake Error at CMakeLists.txt:93 (find_package):
[cmake]:   By not providing "Findasio.cmake" in CMAKE_MODULE_PATH this project has
[cmake]:   asked CMake to find a package configuration file provided by "asio", but
[cmake]:   CMake did not find one.
[cmake]: 
[cmake]:   Could not find a package configuration file provided by "asio" with any of
[cmake]:   the following names:
[cmake]: 
[cmake]:     asioConfig.cmake
[cmake]:     asio-config.cmake
[cmake]: 
[cmake]:   Add the installation prefix of "asio" to CMAKE_PREFIX_PATH or set
[cmake]:   "asio_DIR" to a directory containing one of the above files.  If "asio"
[cmake]:   provides a separate development package or SDK, be sure it has been
[cmake]:   installed.
[cmake]: 
[cmake]: 
cmake process exited with error

plcncli --version:
plcncli 25.0.0.5997 (25.0.0.5997)

The files are there:
external/AXCF1152_2023.0.7/Release/asio-config.cmake

Back then I thought that it was solved on the master, but I was wrong.
Ran that old build again and the problem is still there.
The same with a build from the current master.

Back then I thought that it was solved on the master, but I was wrong.</p>Ran that old build again and the problem is still there.</p>The same with a build from the current master.</p>

SDK version: AXC F 1152 2023.0.7****PLCnCLI version: 25.0.0.5997 (25.0.0.5997)

Dear RXQ,
I’ve tried replicating the library inclusion and have been succesful with including a custom library without configuring CMake, see the steps below for my replication:

Create a new PLM library with TestLib_soFile.pngTestProj_externalFolder.pngTestProj_build.pngTestProj_CMakeCache.png
1. _plcncli new project --name "TestLib"_
2. Set the target for the project with _plcncli set target -n AXCF1152 -v 2023.0.7 --add_
3. Generate all intermediate files with_plcncli generate all_``
4. Build the library with _plcncli build_ . You should now have the following path _/TestLib/bin/AXCF1152_23.0.7.109/Release/lib_ with a .so library file inside.
5. Next, create a new PLM library with _plcncli new project --name "TestProj"_
6. Set the target for the project with _plcncli set target -n AXCF1152 -v 2023.0.7 --add_
7. Copy the entire folder _AXCF1152_23.0.7.109_ __ folder from the TestLib project to the ___External_ __ folder of the new project.
8. Generate all intermediate files with_plcncli generate all_``
9. Build the library with _plcncli build_
If I now look at the generated CMakeCache.txt, it succesfully included the library from the external folder:
Am I overlooking a step you performed or are you using a highly specific library?

Thanks for the insight.
From your screenshots I figured out that SDK 2023.07 results in a foldername of 23.07.109, which is a variant I hadn’t tried on my own.
This is not a specific library (asio, as shown in the logs), but the goal was to use conan as package manager, that works well if you get the folder naming format right.