Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
I
idg
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
8
Merge Requests
8
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ResearchAndDevelopment
idg
Commits
dbe6243d
Commit
dbe6243d
authored
Jan 21, 2021
by
Jakob Maljaars
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes finding python
parent
bc3e6f77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
CMakeLists.txt
CMakeLists.txt
+18
-7
No files found.
CMakeLists.txt
View file @
dbe6243d
...
...
@@ -42,12 +42,21 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Python
option
(
BUILD_WITH_PYTHON
"Build Python bindings"
OFF
)
if
(
${
CMAKE_VERSION
}
VERSION_GREATER
"3.12.4"
)
find_package
(
Python REQUIRED
)
set
(
PYTHON_INSTALL_DIR
${
CMAKE_INSTALL_PREFIX
}
/lib/python
${
Python_VERSION_MAJOR
}
.
${
Python_VERSION_MINOR
}
/site-packages/idg
)
else
()
find_package
(
PythonInterp REQUIRED
)
set
(
PYTHON_INSTALL_DIR
${
CMAKE_INSTALL_PREFIX
}
/lib/python
${
PYTHON_VERSION_MAJOR
}
.
${
PYTHON_VERSION_MINOR
}
/site-packages/idg
)
if
(
BUILD_WITH_PYTHON
)
if
(
${
CMAKE_VERSION
}
VERSION_GREATER
"3.12.4"
)
find_package
(
Python REQUIRED
)
set
(
PYTHON_VERSION
${
Python_VERSION
}
)
set
(
PYTHON_VERSION_MAJOR
${
Python_VERSION_MAJOR
}
)
set
(
PYTHON_VERSION_MINOR
${
Python_VERSION_MINOR
}
)
else
()
find_package
(
PythonInterp REQUIRED
)
set
(
PYTHON_VERSION
${
PYTHON_VERSION_STRING
}
)
endif
()
if
(
${
PYTHON_VERSION
}
VERSION_LESS
"3.6"
)
message
(
FATAL_ERROR
"IDG requires python version >= 3.6, but found
${
PYTHON_VERSION
}
. Using cmake >= 3.12 might fix this error"
)
endif
()
set
(
PYTHON_INSTALL_DIR
${
CMAKE_INSTALL_PREFIX
}
/lib/python
${
PYTHON_VERSION_MAJOR
}
.
${
PYTHON_VERSION_MINOR
}
/site-packages/idg
)
endif
()
if
(
BUILD_TESTING
)
...
...
@@ -58,7 +67,9 @@ add_subdirectory("idg-util")
add_subdirectory
(
"idg-lib"
)
add_subdirectory
(
"idg-bin"
)
add_subdirectory
(
"idg-api"
)
add_subdirectory
(
"idg-cal"
)
if
(
BUILD_WITH_PYTHON
)
add_subdirectory
(
"idg-cal"
)
endif
()
# Write environment-module
configure_file
(
...
...
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