Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
c361af37
Unverified
Commit
c361af37
authored
May 26, 2021
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
z and bz2 finding, component.cif download
parent
73487fc2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
29 deletions
+25
-29
CMakeLists.txt
+25
-29
No files found.
CMakeLists.txt
View file @
c361af37
...
...
@@ -6,33 +6,6 @@ project(cifpp VERSION 1.1.0)
set
(
CMAKE_CXX_STANDARD 17
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
# Set bindir, if not use -DBIN_INSTALL_DIR
if
(
NOT BIN_INSTALL_DIR
)
if
(
CMAKE_INSTALL_BINDIR
)
set
(
BIN_INSTALL_DIR
${
CMAKE_INSTALL_BINDIR
}
)
else
(
CMAKE_INSTALL_BINDIR
)
set
(
BIN_INSTALL_DIR
"
${
CMAKE_INSTALL_PREFIX
}
/bin"
)
endif
(
CMAKE_INSTALL_BINDIR
)
endif
(
NOT BIN_INSTALL_DIR
)
# Set libdir, if not use -DLIB_INSTALL_DIR
if
(
NOT LIB_INSTALL_DIR
)
if
(
CMAKE_INSTALL_LIBDIR
)
set
(
LIB_INSTALL_DIR
${
CMAKE_INSTALL_LIBDIR
}
)
else
(
CMAKE_INSTALL_LIBDIR
)
set
(
LIB_INSTALL_DIR
"
${
CMAKE_INSTALL_PREFIX
}
/lib
${
LIB_SUFFIX
}
"
)
endif
(
CMAKE_INSTALL_LIBDIR
)
endif
(
NOT LIB_INSTALL_DIR
)
# Set includedir, if not use -DINCLUDE_INSTALL_DIR
if
(
NOT INCLUDE_INSTALL_DIR
)
if
(
CMAKE_INSTALL_INCLUDEDIR
)
set
(
INCLUDE_INSTALL_DIR
${
CMAKE_INSTALL_INCLUDEDIR
}
)
else
(
CMAKE_INSTALL_INCLUDEDIR
)
set
(
INCLUDE_INSTALL_DIR
"
${
CMAKE_INSTALL_PREFIX
}
/include"
)
endif
(
CMAKE_INSTALL_INCLUDEDIR
)
endif
(
NOT INCLUDE_INSTALL_DIR
)
# Set sharedir, if not use -DSHARE_INSTALL_DIR
if
(
NOT SHARE_INSTALL_DIR
)
if
(
CMAKE_INSTALL_DATADIR
)
...
...
@@ -53,6 +26,9 @@ set(CMAKE_THREAD_PREFER_PTHREAD)
set
(
THREADS_PREFER_PTHREAD_FLAG
)
find_package
(
Threads
)
find_package
(
ZLIB
)
find_package
(
BZip2
)
set
(
project_sources
${
PROJECT_SOURCE_DIR
}
/src/AtomType.cpp
${
PROJECT_SOURCE_DIR
}
/src/BondMap.cpp
...
...
@@ -95,12 +71,23 @@ include_directories(
${
PROJECT_SOURCE_DIR
}
/src
)
# download the components.cif file from CCD
if
(
NOT EXISTS
${
PROJECT_SOURCE_DIR
}
/data
)
file
(
MAKE_DIRECTORY
${
PROJECT_SOURCE_DIR
}
/data/
)
endif
()
# unfortunately, extract_archive does not recognize .gz files on Windows?
if
(
NOT EXISTS
${
PROJECT_SOURCE_DIR
}
/data/components.cif
)
file
(
DOWNLOAD ftp://ftp.wwpdb.org/pub/pdb/data/monomers/components.cif
${
PROJECT_SOURCE_DIR
}
/data/components.cif
SHOW_PROGRESS
)
endif
()
add_library
(
${
PROJECT_NAME
}
${
project_sources
}
${
project_headers
}
)
add_executable
(
unit-test
${
PROJECT_SOURCE_DIR
}
/test/unit-test.cpp
)
configure_file
(
${
PROJECT_SOURCE_DIR
}
/src/Config.hpp.in Config.hpp
)
target_include_directories
(
${
PROJECT_NAME
}
PUBLIC $<BUILD_INTERFACE:
${
Boost_INCLUDE_DIRS
}
>
)
# install(FILES ${CMAKE_BINARY_DIR}/Config.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
include_directories
(
${
PROJECT_NAME
}
PUBLIC
${
Boost_INCLUDE_DIRS
}
)
link_libraries
(
${
PROJECT_NAME
}
${
Boost_LIBRARIES
}
)
...
...
@@ -111,7 +98,15 @@ target_compile_definitions(${PROJECT_NAME}
target_compile_definitions
(
unit-test
PUBLIC
""
CACHE_DIR=
"
${
SHARE_INSTALL_DIR
}
/libcifpp"
DATA_DIR=
"
${
SHARE_INSTALL_DIR
}
/libcifpp"
)
target_link_libraries
(
unit-test
${
PROJECT_NAME
}
${
Boost_LIBRARIES
}
z bz2 Threads::Threads
)
target_link_libraries
(
unit-test
${
PROJECT_NAME
}
${
Boost_LIBRARIES
}
Threads::Threads
)
if
(
${
ZLIB_FOUND
}
)
target_link_libraries
(
unit-test ZLIB::ZLIB
)
endif
()
if
(
${
BZip2_FOUND
}
)
target_link_libraries
(
unit-test BZip2::BZip2
)
endif
()
if
(
MSVC
)
# make msvc standards compliant...
...
...
@@ -151,6 +146,7 @@ install(
install
(
FILES
${
PROJECT_SOURCE_DIR
}
/rsrc/mmcif_ddl.dic
${
PROJECT_SOURCE_DIR
}
/rsrc/mmcif_pdbx_v50.dic
${
PROJECT_SOURCE_DIR
}
/data/components.cif
DESTINATION share/libcifpp/
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment