Closed LLL-YUE closed 1 year ago
Hi @LLL-YUE This should be in the same CMakeLists.txt that defines your TARGET. So if you have a command line application hello.cpp that wants to use VPL and it has a CMakeLists.txt in the same folder as the hello.cpp then in that CMakeList.txt:
set(TARGET hello)
set(SOURCES hello.cpp)
add_executable(${TARGET} ${SOURCES})
// code link VPL to hello
if(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(CMAKE_LIBRARY_ARCHITECTURE x86)
endif()
find_package(VPL REQUIRED)
target_link_libraries(${TARGET} VPL::dispatcher)
Does that make sense?
Closed due to inactivity. Feel free to reopen with more information
In this step, which CMakeList(in which folder) should I add the following code to? if(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 4) set(CMAKE_LIBRARY_ARCHITECTURE x86) endif() find_package(VPL REQUIRED) target_link_libraries(${TARGET} VPL::dispatcher)