File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -122,18 +122,26 @@ CPMFindPackage(
122
122
GIT_TAG v1.4.2
123
123
EXCLUDE_FROM_ALL YES )
124
124
125
- CPMFindPackage (
126
- NAME cifpp
127
- GIT_REPOSITORY https://github.com/pdb-redo/libcifpp.git
128
- GIT_TAG v8.0.1
129
- EXCLUDE_FROM_ALL YES
130
- )
125
+ # CPMFindPackage does not pass on variables set with set_and_check
126
+ # Working around this here
127
+ find_package (cifpp 8.0.1 QUIET )
128
+
129
+ if (NOT cifpp_FOUND )
130
+ CPMAddPackage (
131
+ NAME cifpp
132
+ GIT_REPOSITORY https://github.com/pdb-redo/libcifpp.git
133
+ GIT_TAG v8.0.1
134
+ EXCLUDE_FROM_ALL YES )
135
+ endif ()
131
136
132
137
if (TARGET cifpp )
133
138
get_target_property (CIFPP_SOURCE_DIR cifpp SOURCE_DIR )
134
139
set (CIFPP_DATA_DIR ${CIFPP_SOURCE_DIR} /rsrc )
135
- else ()
140
+ elseif (DEFINED CIFPP_SHARE_DIR )
141
+ message (NOTICE "dssp: using ${CIFPP_SHARE_DIR} from CIFPP_SHARE_DIR as CIFPP_DATA_DIR" )
136
142
set (CIFPP_DATA_DIR ${CIFPP_SHARE_DIR} )
143
+ else ()
144
+ message (FATAL_ERROR "dssp: The CIFPP_SHARE_DIR variable is not found in the cifpp configuration files" )
137
145
endif ()
138
146
139
147
if (INSTALL_LIBRARY )
@@ -149,7 +157,6 @@ target_link_libraries(mkdssp PRIVATE mcfp::mcfp dssp::dssp)
149
157
if (USE_RSRC )
150
158
mrc_target_resources (mkdssp
151
159
${CIFPP_DATA_DIR} /mmcif_pdbx.dic
152
- ${CIFPP_DATA_DIR} /mmcif_ddl.dic
153
160
${CMAKE_CURRENT_SOURCE_DIR} /libdssp/mmcif_pdbx/dssp-extension.dic )
154
161
else ()
155
162
get_target_property (LIBDSSP_SOURCE_DIR dssp SOURCE_DIR )
You can’t perform that action at this time.
0 commit comments