Skip to content

Commit

Permalink
Fix CMake wrong install target.
Browse files Browse the repository at this point in the history
  • Loading branch information
kouchy committed Mar 5, 2024
1 parent 1aabaa4 commit 3b59b77
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -350,26 +350,19 @@ else()
endif()

if (AFF3CT_CORE_COMPILE_SHARED_LIB AND NOT AFF3CT_CORE_COMPILE_STATIC_LIB)
export(TARGETS
aff3ct-core-shared-lib
${CPPTRACE_TARGETS}
export(TARGETS aff3ct-core-shared-lib ${CPPTRACE_TARGETS}
NAMESPACE aff3ct-core::
FILE "lib/cmake/aff3ct-core/aff3ct-core-config.cmake")
endif()

if (AFF3CT_CORE_COMPILE_STATIC_LIB AND NOT AFF3CT_CORE_COMPILE_SHARED_LIB)
export(TARGETS
aff3ct-core-static-lib
${CPPTRACE_TARGETS}
export(TARGETS aff3ct-core-static-lib ${CPPTRACE_TARGETS}
NAMESPACE aff3ct-core::
FILE "lib/cmake/aff3ct-core/aff3ct-core-config.cmake")
endif()

if(AFF3CT_CORE_COMPILE_SHARED_LIB AND AFF3CT_CORE_COMPILE_STATIC_LIB)
export(TARGETS
aff3ct-core-shared-lib
aff3ct-core-static-lib
${CPPTRACE_TARGETS}
export(TARGETS aff3ct-core-shared-lib aff3ct-core-static-lib ${CPPTRACE_TARGETS}
NAMESPACE aff3ct-core::
FILE "lib/cmake/aff3ct-core/aff3ct-core-config.cmake")
endif()
Expand All @@ -380,20 +373,20 @@ endif()

if(AFF3CT_CORE_COMPILE_SHARED_LIB)
if(WIN32)
install(TARGETS aff3ct-core-shared-lib ${CPPTRACE_TARGETS}
install(TARGETS aff3ct-core-shared-lib
EXPORT aff3ct-core-config
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/
COMPONENT library)
else()
install(TARGETS aff3ct-core-shared-lib ${CPPTRACE_TARGETS}
install(TARGETS aff3ct-core-shared-lib
EXPORT aff3ct-core-config
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/
COMPONENT library)
endif()
endif()
if(AFF3CT_CORE_COMPILE_STATIC_LIB)
install(TARGETS aff3ct-core-static-lib ${CPPTRACE_TARGETS}
install(TARGETS aff3ct-core-static-lib
EXPORT aff3ct-core-config
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/
COMPONENT library)
Expand Down

0 comments on commit 3b59b77

Please sign in to comment.