Skip to content

Commit

Permalink
[Config] Fix findcxxopt when version is not specified (#4564)
Browse files Browse the repository at this point in the history
* Remove error and send warning when cxxopt is found but version mismatch

* [all] Install FindTinyXML2  (#4545)

Install FindTinyXML2 for OOT compilation using the binaries

* [Visual] Fix cmake config  (#4555)

Remove the find_package(tinyxml2 REQUIRED) because the link is private

* Set link to tinyxml2 to PRIVATE and fix config file

* Check if version is specified before checking the version to avoid errors

* Set cxx_opts_FOUND when the version is not required

---------

Co-authored-by: Hugo <[email protected]>
  • Loading branch information
bakpaul and hugtalbot authored Mar 8, 2024
1 parent 514562a commit 2577d86
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Sofa/framework/Config/cmake/Modules/Findcxxopts.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ if(NOT TARGET cxxopts::cxxopts)
endif()

if(cxxopts_INCLUDE_DIR)
_cxxopts_check_version()
set(cxxopts_FOUND ${cxxopts_VERSION_OK})
if(cxxopts_FIND_VERSION)
_cxxopts_check_version()
set(cxxopts_FOUND ${cxxopts_VERSION_OK})
else()
set(cxxopts_FOUND TRUE)
endif()
endif()

if(cxxopts_FOUND)
Expand Down

0 comments on commit 2577d86

Please sign in to comment.