Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Overwrite install list #500

Open
OgreTransporter opened this issue Nov 9, 2022 · 0 comments
Open

Overwrite install list #500

OgreTransporter opened this issue Nov 9, 2022 · 0 comments

Comments

@OgreTransporter
Copy link

Line 27

set(flann_install_targets flann_cpp)

overwrites line 17
list(APPEND flann_install_targets flann_cpp_s)

so that flann_cpp_s is never installed.

Proposal:

diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
index 7603abc..e0e519c 100644
--- a/src/cpp/CMakeLists.txt
+++ b/src/cpp/CMakeLists.txt
@@ -8,6 +8,13 @@ file(GLOB_RECURSE C_SOURCES flann.cpp)
 file(GLOB_RECURSE CPP_SOURCES flann_cpp.cpp)
 file(GLOB_RECURSE CU_SOURCES *.cu)

+add_library(flann_cpp SHARED ${CPP_SOURCES})
+target_link_libraries(flann_cpp ${LZ4_LINK_LIBRARIES})
+# export lz4 headers, so that MSVC to creates flann_cpp.lib
+set_target_properties(flann_cpp PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS YES)
+
+set(flann_install_targets flann_cpp)
+
 add_library(flann_cpp_s STATIC ${CPP_SOURCES})
 target_link_libraries(flann_cpp_s PUBLIC ${LZ4_LINK_LIBRARIES})
 if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
@@ -19,13 +26,6 @@ else()
     set_target_properties(flann_cpp_s PROPERTIES EXCLUDE_FROM_ALL true)
 endif()

-add_library(flann_cpp SHARED ${CPP_SOURCES})
-target_link_libraries(flann_cpp ${LZ4_LINK_LIBRARIES})
-# export lz4 headers, so that MSVC to creates flann_cpp.lib
-set_target_properties(flann_cpp PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS YES)
-
-set(flann_install_targets flann_cpp)
-
 if (BUILD_CUDA_LIB)
     SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-DFLANN_USE_CUDA;-Xcudafe \"--diag_suppress=partial_override\" ;-gencode=arch=compute_52,code=\"sm_52,compute_52\";-gencode=arch=compute_61,code=\"sm_61,compute_61\"")
     if(CMAKE_COMPILER_IS_GNUCC)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant