Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lammps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
multiscale
lammps
Commits
db180209
Commit
db180209
authored
6 years ago
by
Christoph Junghans
Browse files
Options
Downloads
Patches
Plain Diff
FindLAMMPS.cmake: add LAMMPS_API_DEFINES
parent
47b8a116
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/FindLAMMPS.cmake.in
+4
-2
4 additions, 2 deletions
cmake/FindLAMMPS.cmake.in
with
4 additions
and
2 deletions
cmake/FindLAMMPS.cmake.in
+
4
−
2
View file @
db180209
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
# The following variables will set:
# The following variables will set:
# LAMMPS_INCLUDE_DIRS - where to find lammps/library.h, etc.
# LAMMPS_INCLUDE_DIRS - where to find lammps/library.h, etc.
# LAMMPS_LIBRARIES - List of libraries when using lammps.
# LAMMPS_LIBRARIES - List of libraries when using lammps.
# LAMMPS_API_DEFINES - lammps library api defines
# LAMMPS_VERSION - lammps library version
# LAMMPS_VERSION - lammps library version
# LAMMPS_FOUND - True if liblammps found.
# LAMMPS_FOUND - True if liblammps found.
#
#
...
@@ -26,8 +27,9 @@ find_package(PkgConfig)
...
@@ -26,8 +27,9 @@ find_package(PkgConfig)
pkg_check_modules(PC_LAMMPS liblammps@LAMMPS_LIB_SUFFIX@)
pkg_check_modules(PC_LAMMPS liblammps@LAMMPS_LIB_SUFFIX@)
find_path(LAMMPS_INCLUDE_DIR lammps/library.h HINTS ${PC_LAMMPS_INCLUDE_DIRS} @CMAKE_INSTALL_FULL_INCLUDEDIR@)
find_path(LAMMPS_INCLUDE_DIR lammps/library.h HINTS ${PC_LAMMPS_INCLUDE_DIRS} @CMAKE_INSTALL_FULL_INCLUDEDIR@)
# TODO figure out library version from header
# TODO figure
these
out library version from header
set(LAMMPS_VERSION 20180822)
set(LAMMPS_VERSION 20180822)
set(LAMMPS_API_DEFINES @LAMMPS_API_DEFINES@)
find_library(LAMMPS_LIBRARY NAMES lammps@LAMMPS_LIB_SUFFIX@ HINTS ${PC_LAMMPS_LIBRARY_DIRS} @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(LAMMPS_LIBRARY NAMES lammps@LAMMPS_LIB_SUFFIX@ HINTS ${PC_LAMMPS_LIBRARY_DIRS} @CMAKE_INSTALL_FULL_LIBDIR@)
...
@@ -43,5 +45,5 @@ mark_as_advanced(LAMMPS_INCLUDE_DIR LAMMPS_LIBRARY)
...
@@ -43,5 +45,5 @@ mark_as_advanced(LAMMPS_INCLUDE_DIR LAMMPS_LIBRARY)
if(LAMMPS_FOUND AND NOT TARGET LAMMPS::LAMMPS)
if(LAMMPS_FOUND AND NOT TARGET LAMMPS::LAMMPS)
add_library(LAMMPS::LAMMPS UNKNOWN IMPORTED)
add_library(LAMMPS::LAMMPS UNKNOWN IMPORTED)
set_target_properties(LAMMPS::LAMMPS PROPERTIES IMPORTED_LOCATION ${LAMMPS_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES ${LAMMPS_INCLUDE_DIR})
set_target_properties(LAMMPS::LAMMPS PROPERTIES IMPORTED_LOCATION
"
${LAMMPS_LIBRARY}
"
INTERFACE_INCLUDE_DIRECTORIES
"
${LAMMPS_INCLUDE_DIR}
" INTERFACE_COMPILE_DEFINITIONS "${LAMMPS_API_DEFINES}"
)
endif()
endif()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment