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
3b2c5731
Unverified
Commit
3b2c5731
authored
May 18, 2021
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial cmake file
parent
36351a06
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
125 additions
and
0 deletions
+125
-0
.gitignore
+1
-0
CMakeLists.txt
+124
-0
No files found.
.gitignore
View file @
3b2c5731
build/
obj.dbg/
obj/
.libs/
...
...
CMakeLists.txt
0 → 100644
View file @
3b2c5731
cmake_minimum_required
(
VERSION 3.10
)
# set the project name
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
)
set
(
SHARE_INSTALL_DIR
"
${
CMAKE_INSTALL_DATADIR
}
"
)
else
(
CMAKE_INSTALL_DATADIR
)
set
(
SHARE_INSTALL_DIR
"
${
CMAKE_INSTALL_PREFIX
}
/share"
)
endif
(
CMAKE_INSTALL_DATADIR
)
endif
(
NOT SHARE_INSTALL_DIR
)
set
(
Boost_DETAILED_FAILURE_MSG ON
)
# set (BOOST_ROOT ${PROJECT_SOURCE_DIR}/../boost_1_75_0)
set
(
Boost_COMPILER
"-vc"
)
# set (Boost_USE_STATIC_RUNTIME ON)
find_package
(
Boost 1.73.0 REQUIRED COMPONENTS system iostreams
)
set
(
CMAKE_THREAD_PREFER_PTHREAD
)
set
(
THREADS_PREFER_PTHREAD_FLAG
)
find_package
(
Threads
)
set
(
project_sources
${
PROJECT_SOURCE_DIR
}
/src/AtomType.cpp
${
PROJECT_SOURCE_DIR
}
/src/BondMap.cpp
${
PROJECT_SOURCE_DIR
}
/src/Cif++.cpp
${
PROJECT_SOURCE_DIR
}
/src/Cif2PDB.cpp
${
PROJECT_SOURCE_DIR
}
/src/CifParser.cpp
${
PROJECT_SOURCE_DIR
}
/src/CifUtils.cpp
${
PROJECT_SOURCE_DIR
}
/src/CifValidator.cpp
${
PROJECT_SOURCE_DIR
}
/src/Compound.cpp
${
PROJECT_SOURCE_DIR
}
/src/PDB2Cif.cpp
${
PROJECT_SOURCE_DIR
}
/src/PDB2CifRemark3.cpp
${
PROJECT_SOURCE_DIR
}
/src/Point.cpp
${
PROJECT_SOURCE_DIR
}
/src/Secondary.cpp
${
PROJECT_SOURCE_DIR
}
/src/Structure.cpp
${
PROJECT_SOURCE_DIR
}
/src/Symmetry.cpp
${
PROJECT_SOURCE_DIR
}
/src/SymOpTable_data.cpp
${
PROJECT_SOURCE_DIR
}
/src/TlsParser.cpp
)
set
(
project_headers
${
PROJECT_SOURCE_DIR
}
/include/cif++/AtomType.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/BondMap.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/Cif++.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/Cif2PDB.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/CifParser.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/CifUtils.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/CifValidator.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/Compound.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/PDB2Cif.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/PDB2CifRemark3.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/Point.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/Secondary.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/Structure.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/Symmetry.hpp
${
PROJECT_SOURCE_DIR
}
/include/cif++/TlsParser.hpp
)
include_directories
(
${
PROJECT_SOURCE_DIR
}
/include
${
PROJECT_SOURCE_DIR
}
/src
)
add_library
(
${
PROJECT_NAME
}
${
project_sources
}
${
project_headers
}
)
configure_file
(
libcifpp.pc.in
${
CMAKE_BINARY_DIR
}
/libcifpp.pc IMMEDIATE @ONLY
)
install
(
FILES
${
CMAKE_BINARY_DIR
}
/libcifpp.pc DESTINATION
${
LIB_INSTALL_DIR
}
/pkgconfig
)
configure_file
(
${
PROJECT_SOURCE_DIR
}
/src/Config.hpp.in Config.hpp
)
target_include_directories
(
${
PROJECT_NAME
}
PUBLIC
"
${
PROJECT_BINARY_DIR
}
"
)
# install(FILES ${CMAKE_BINARY_DIR}/Config.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
if
(
Boost_FOUND
)
target_include_directories
(
${
PROJECT_NAME
}
PUBLIC
${
Boost_INCLUDE_DIRS
}
)
target_link_libraries
(
${
PROJECT_NAME
}
${
Boost_LIBRARIES
}
)
endif
()
install
(
DIRECTORY include/cif++ DESTINATION
${
INCLUDE_INSTALL_DIR
}
)
install
(
TARGETS
${
PROJECT_NAME
}
LIBRARY DESTINATION
${
LIB_INSTALL_DIR
}
ARCHIVE DESTINATION
${
LIB_INSTALL_DIR
}
RUNTIME DESTINATION
${
BIN_INSTALL_DIR
}
)
if
(
MSVC
)
# Disable a MSVC warning type.
target_compile_options
(
cifpp PRIVATE /permissive-
)
endif
()
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