Closed hillu closed 4 years ago
unfortunately, this is not a good fix, because it breaks installation of other PE-sieve based projects, that relies of the pe-sieve.dll
being dropped directly into the ${CMAKE_INSTALL_PREFIX}
directory.
Would something like this help?
if (PESIEVE_AS_STATIC_LIB OR PESIEVE_AS_DLL)
include(GNUInstallDirs)
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
endif()
if (NOT PESIEVE_AS_STATIC_LIB)
install(TARGETS ${PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT ${PROJECT_NAME}
)
endif()
Sure, that works. Updated the PR.
does it still cause problems if you try to switch to PESIEVE_AS_DLL
though?
No cmake problems with PESIEVE_AS_DLL
. Doesn't cross-compile, but this seems unrelated:
$SRCDIRpe_sieve_api.cpp:34:25: error: external linkage required for symbol ‘PESieve_version’ because of ‘dllexport’ attribute
const DWORD PESIEVE_API PESieve_version = pesieve::PESIEVE_VERSION_ID;
^~~~~~~~~~~~~~~
@hillu Thank you! I made one more change in the code, that could possibly fix the other bug. Can you check if it helps?
Sorry, it does not work as of 1804d9ffbd5f048c6ef40054a37b50dfc243804e
I see... Thanks for checking.
Apparently,
ARCHIVE DESTINATION
is overwritten by the secondinstall
statement, leading to the following error message: