Skip to content

compile tesseract add_library error #140

@pol2095

Description

@pol2095

Hello,

When I compile Teseract on Windows, I have this message error in VisualStudio CMake :

CMake Error at out/build/x64-Release/.sw/cmake/CMakeLists.txt:1706 (add_library):
  add_library cannot create ALIAS target "org.sw.demo.python.lib-3" because
  another target with the same name already exists.		C:\Users\user\CMake\tesseract\out/build/x64-Release/.sw/cmake/CMakeLists.txt	1706

in tesseract\out\build\x64-Debug\.sw\cmake\CMakeLists.txt I have :

if (NOT TARGET org.sw.demo.python.lib-3.10.13)
    add_library(org.sw.demo.python.lib-3.10.13 SHARED IMPORTED GLOBAL)

    add_dependencies(org.sw.demo.python.lib-3.10.13 sw_build_dependencies)

    add_library(org.sw.demo.python.lib-3.10 ALIAS org.sw.demo.python.lib-3.10.13)
    add_library(org.sw.demo.python.lib-3 ALIAS org.sw.demo.python.lib-3.10.13)
    add_library(org.sw.demo.python.lib ALIAS org.sw.demo.python.lib-3.10.13)
endif()

if (NOT TARGET org.sw.demo.python.lib-3.13.7)
    add_library(org.sw.demo.python.lib-3.13.7 SHARED IMPORTED GLOBAL)

    add_dependencies(org.sw.demo.python.lib-3.13.7 sw_build_dependencies)

    add_library(org.sw.demo.python.lib-3.13 ALIAS org.sw.demo.python.lib-3.13.7)
    add_library(org.sw.demo.python.lib-3 ALIAS org.sw.demo.python.lib-3.13.7)
    add_library(org.sw.demo.python.lib ALIAS org.sw.demo.python.lib-3.13.7)
endif()

how I prevent this ?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions