Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
fab12fec
Commit
fab12fec
authored
Jul 28, 2021
by
Stephen
Browse files
Export pythoninterfacecore
parent
e325bbd4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Framework/PythonInterface/core/CMakeLists.txt
View file @
fab12fec
...
...
@@ -70,6 +70,7 @@ enable_precompiled_headers(inc/MantidPythonInterface/core/PrecompiledHeader.h SR
# Add the target for this directory
set
(
_target_name PythonInterfaceCore
)
add_library
(
${
_target_name
}
${
SRC_FILES
}
${
INC_FILES
}
)
add_library
(
Mantid::
${
_target_name
}
ALIAS
${
_target_name
}
)
...
...
@@ -79,22 +80,25 @@ target_include_directories(${_target_name} PUBLIC
$<INSTALL_INTERFACE:include/Mantid>
)
target_include_directories
(
${
_target_name
}
SYSTEM PUBLIC
${
Boost_INCLUDE_DIRS
}
)
# Set the name of the generated library
set_target_properties
(
${
_target_name
}
PROPERTIES OUTPUT_NAME MantidPythonInterfaceCore
COMPILE_DEFINITIONS IN_MANTID_PYTHONINTERFACE_CORE
)
# We need an if check here as older versions of boost won't define this target
# we can remove it once we adopt conda fully.
if
(
TARGET Boost::python
${
Python_VERSION_MAJOR
}${
Python_VERSION_MINOR
}
)
set
(
PUBLIC_TARGETS Python::NumPy Boost::python
${
Python_VERSION_MAJOR
}${
Python_VERSION_MINOR
}
)
else
()
set
(
PUBLIC_TARGETS Python::NumPy
${
BoostPython_LIBRARIES
}
)
endif
()
if
(
USE_PYTHON_DYNAMIC_LIB
)
list
(
APPEND PUBLIC_TARGETS Python::Python
)
endif
()
# Dependencies
target_link_libraries
(
${
_target_name
}
PUBLIC
${
PUBLIC_TARGETS
}
Mantid::Kernel
${
Boost_LIBRARIES
}
PUBLIC
${
PUBLIC_TARGETS
}
Mantid::Kernel
PRIVATE Mantid::Types
)
...
...
@@ -112,6 +116,12 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
)
endif
()
if
(
CONDA_BUILD
)
set
(
TARGET_EXPORT_NAME
"MantidPythonInterfaceCoreTargets"
)
mtd_install_framework_lib
(
TARGETS PythonInterfaceCore EXPORT_NAME
${
TARGET_EXPORT_NAME
}
)
else
()
mtd_install_targets
(
TARGETS PythonInterfaceCore INSTALL_DIRS
${
LIB_DIR
}
${
WORKBENCH_LIB_DIR
}
)
endif
()
Framework/PythonInterface/mantid/CMakeLists.txt
View file @
fab12fec
...
...
@@ -13,6 +13,7 @@ set_property(TARGET PythonModule PROPERTY FOLDER "MantidFramework/Python")
# Sub modules
# These sub modules are currently not exported by cmake as they are not needed in a dev environment
add_subdirectory
(
kernel
)
# Ensure the module files are in place
add_dependencies
(
PythonKernelModule PythonModule
)
...
...
buildconfig/CMake/MantidFrameworkConfig.cmake.in
View file @
fab12fec
...
...
@@ -4,8 +4,9 @@
include(CMakeFindDependencyMacro)
find_dependency(Boost COMPONENTS date_time regex serialization filesystem system)
find_dependency(Python @Python_VERSION_MAJOR@.@Python_VERSION_MINOR@ REQUIRED
COMPONENTS Interpreter Development NumPy)
find_dependency(Boost COMPONENTS date_time regex serialization filesystem system python${Python_VERSION_MAJOR}${Python_VERSION_MINOR})
find_dependency(Poco COMPONENTS Foundation Util XML Net Crypto NetSSL)
find_dependency(GSL)
find_dependency(ZLIB)
...
...
@@ -55,6 +56,7 @@ set(MODULES
ScriptRepository
Muon
Reflectometry
PythonInterfaceCore
)
foreach(module ${MODULES})
...
...
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