mirror of
https://github.com/PDB-REDO/dssp.git
synced 2026-06-04 13:44:21 +08:00
for windows, I hope
This commit is contained in:
@@ -62,26 +62,6 @@ endif()
|
||||
if(MSVC)
|
||||
# make msvc standards compliant...
|
||||
add_compile_options(/permissive-)
|
||||
add_link_options(/NODEFAULTLIB:library)
|
||||
|
||||
macro(get_WIN32_WINNT version)
|
||||
if(WIN32 AND CMAKE_SYSTEM_VERSION)
|
||||
set(ver ${CMAKE_SYSTEM_VERSION})
|
||||
string(REPLACE "." "" ver ${ver})
|
||||
string(REGEX REPLACE "([0-9])" "0\\1" ver ${ver})
|
||||
|
||||
set(${version} "0x${ver}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
get_WIN32_WINNT(ver)
|
||||
add_definitions(-D_WIN32_WINNT=${ver})
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
else()
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Create a revision file, containing the current git version info
|
||||
@@ -124,6 +104,10 @@ if(NOT cifpp_FOUND)
|
||||
GIT_REPOSITORY https://github.com/pdb-redo/libcifpp.git
|
||||
GIT_TAG v8.0.1)
|
||||
FetchContent_MakeAvailable(cifpp)
|
||||
get_target_property(CIFPP_SOURCE_DIR cifpp SOURCE_DIR)
|
||||
set(CIFPP_DATA_DIR ${CIFPP_SOURCE_DIR})
|
||||
else()
|
||||
set(CIFPP_DATA_DIR ${CIFPP_SHARE_DIR})
|
||||
endif()
|
||||
|
||||
if(INSTALL_LIBRARY)
|
||||
@@ -142,10 +126,11 @@ if(USE_RSRC)
|
||||
${CIFPP_SHARE_DIR}/mmcif_ddl.dic
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libdssp/mmcif_pdbx/dssp-extension.dic)
|
||||
else()
|
||||
get_target_property(CIFPP_SOURCE_DIR cifpp SOURCE_DIR)
|
||||
get_target_property(LIBDSSP_SOURCE_DIR dssp SOURCE_DIR)
|
||||
|
||||
install(FILES ${CIFPP_SOURCE_DIR}/rsrc/mmcif_pdbx.dic ${CMAKE_CURRENT_SOURCE_DIR}/libdssp/mmcif_pdbx/dssp-extension.dic
|
||||
install(FILES
|
||||
${CIFPP_DATA_DIR}/mmcif_pdbx.dic
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libdssp/mmcif_pdbx/dssp-extension.dic
|
||||
DESTINATION ${CIFPP_SHARE_DIR})
|
||||
endif()
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ find_package(Python REQUIRED COMPONENTS Interpreter Development)
|
||||
find_package(Boost 1.83 REQUIRED COMPONENTS python)
|
||||
|
||||
# ---------
|
||||
|
||||
add_library(mkdssp_module SHARED dssp-python-plugin.cpp)
|
||||
|
||||
target_compile_features(mkdssp_module PUBLIC cxx_std_20)
|
||||
@@ -43,4 +42,8 @@ set_target_properties(mkdssp_module
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
|
||||
install(TARGETS mkdssp_module LIBRARY DESTINATION "${Python_SITELIB}")
|
||||
if(MSVC)
|
||||
install(TARGETS mkdssp_module RUNTIME DESTINATION "${Python_SITELIB}")
|
||||
else()
|
||||
install(TARGETS mkdssp_module LIBRARY DESTINATION "${Python_SITELIB}")
|
||||
endif()
|
||||
Reference in New Issue
Block a user