Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Swigcsm
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
aflab
astrogeology
Swigcsm
Commits
f9dd5d66
Commit
f9dd5d66
authored
6 years ago
by
Kelvin Rodriguez
Committed by
jlaura
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix macOS rpath error (#15)
* fix OSX rpath error * removed python include dir print line
parent
c35028fa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
python/CMakeLists.txt
+9
-8
9 additions, 8 deletions
python/CMakeLists.txt
recipe/build.sh
+2
-2
2 additions, 2 deletions
recipe/build.sh
recipe/meta.yaml
+4
-3
4 additions, 3 deletions
recipe/meta.yaml
with
15 additions
and
13 deletions
python/CMakeLists.txt
+
9
−
8
View file @
f9dd5d66
...
...
@@ -4,27 +4,28 @@ include_directories(${PYTHON_INCLUDE_DIR})
set
(
CMAKE_SWIG_FLAGS
""
)
set
(
CMAKE_SWIG_OUTDIR csmapi
)
set_source_files_properties
(
../csmapi.i
set_source_files_properties
(
../csmapi.i
PROPERTIES CPLUSPLUS ON
)
#Find dependencies
find_path
(
CSM_INCLUDE_DIR NAMES csm.h
PATH_SUFFIXES csm
find_path
(
CSM_INCLUDE_DIR NAMES csm.h
PATH_SUFFIXES csm
PATHS
${
PYTHON_INCLUDE_DIR
}
/../
)
find_library
(
CSM_LIBRARY NAMES csmapi
PATHS
${
PYTHON_LIBRARY
}
/../
)
message
(
"-- Found CSM Include:
${
CSM_INCLUDE_DIR
}
"
)
message
(
"-- Found CSM Lib:
${
CSM_LIBRARY
}
"
)
include_directories
(
${
CSM_INCLUDE_DIR
}
)
# Add and link
# Add and link
swig_add_library
(
csmapi
LANGUAGE python
LANGUAGE python
SOURCES ../csmapi.i
)
set_target_properties
(
_csmapi PROPERTIES LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_SWIG_OUTDIR
}
)
SET
(
CMAKE_INSTALL_RPATH
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
)
if
(
APPLE
)
set_target_properties
(
_csmapi PROPERTIES LINK_FLAGS
"-undefined dynamic_lookup"
)
# On OSX, do not link python - this causes segfaults
...
...
@@ -39,11 +40,11 @@ endif()
# Move the static files to move
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/setup.py.in
${
CMAKE_CURRENT_BINARY_DIR
}
/setup.py
COPYONLY
)
COPYONLY
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/__init__.py
${
CMAKE_CURRENT_BINARY_DIR
}
/csmapi/__init__.py
COPYONLY
)
# Move the tests
file
(
COPY
${
CMAKE_SOURCE_DIR
}
/python/tests
DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
)
\ No newline at end of file
DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
)
This diff is collapsed.
Click to expand it.
recipe/build.sh
+
2
−
2
View file @
f9dd5d66
#!/bin/bash
mkdir
build
&&
cd
build
mkdir
-p
build
&&
cd
build
cmake
-DCMAKE_BUILD_TYPE
=
Release
-DCMAKE_INSTALL_PREFIX
=
$PREFIX
-DANACONDA_PYTHON_VERBOSE
=
ON ..
make
cd
python
$PYTHON
setup.py
install
--single-version-externally-managed
--record
=
/tmp/record.txt
cd
..
\ No newline at end of file
cd
..
This diff is collapsed.
Click to expand it.
recipe/meta.yaml
+
4
−
3
View file @
f9dd5d66
...
...
@@ -9,19 +9,20 @@ requirements:
build
:
-
{{
compiler('cxx')
}}
# [linux]
-
cmake >=3.10
-
python
host
:
-
lib
csm
-
csm
-
python
-
swig
run
:
-
lib
csm
-
csm
-
python
-
numpy
test
:
imports
:
-
csmapi
about
:
home
:
https://github.com/USGS-Astrogeology/CSM-Swig
license
:
None
...
...
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