Coder Social home page Coder Social logo

Comments (2)

awvwgk avatar awvwgk commented on August 11, 2024

I applied this patch as fix

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8618a27..f293f9a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,10 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/dev/cmake
 
 # Find xtb
 find_package(xtb QUIET)
-if(NOT TARGET lib-xtb-static)
+if(TARGET lib-xtb-static)
+  add_library(xtb::xtb INTERFACE IMPORTED)
+  target_link_libraries(xtb::xtb INTERFACE lib-xtb-static)
+else()
   find_package(PkgConfig REQUIRED)
   pkg_check_modules(XTB QUIET xtb)
   if(XTB_FOUND)
diff --git a/src/Xtb/CMakeLists.txt b/src/Xtb/CMakeLists.txt
index 76604eb..d9b4fd2 100644
--- a/src/Xtb/CMakeLists.txt
+++ b/src/Xtb/CMakeLists.txt
@@ -31,7 +31,7 @@ set_target_properties(Xtb PROPERTIES
 target_link_libraries(Xtb
   PRIVATE
     Scine::UtilsOS
-    lib-xtb-static
+    xtb::xtb
     gfortran
   PUBLIC
     Scine::CoreHeaders

from xtb_wrapper.

weymutht avatar weymutht commented on August 11, 2024

Thanks a lot for reporting this. When doing a default build as explained in the README, we cannot reproduce your linking problems. Furthermore, after applying your patch, CMake fails with the following error:

CMake Error at src/Xtb/CMakeLists.txt:10 (add_library):
  Target "Xtb" links to target "xtb::xtb" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?

from xtb_wrapper.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.