This repository has been archived by the owner on Feb 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #531 from lr-morales/libs/easyiceconfig/485-cmake_…
…paths [Issue #485] Refactor easyiceconfig to use CMAKE_INSTALL_PREFIX
- Loading branch information
Showing
8 changed files
with
84 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
find_package(PythonInterp 2 REQUIRED) | ||
|
||
execute_process( | ||
COMMAND ${PYTHON_EXECUTABLE} -c "import os;print(os.path.dirname(os.__file__))" | ||
RESULT_VARIABLE _RESULT | ||
OUTPUT_VARIABLE PYTHON_MODULE_PATH | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
|
||
if(_RESULT) | ||
message(FATAL_ERROR "Failed to determine python information") | ||
endif(_RESULT) | ||
unset(_RESULT) | ||
|
||
message(${PYTHON_MODULE_PATH}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,28 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
|
||
configure_file( | ||
easyiceconfig/hardcodedpaths.py.in | ||
easyiceconfig/hardcodedpaths.py | ||
@ONLY | ||
) | ||
|
||
file(GLOB ModuleFiles | ||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/easyiceconfig | ||
${CMAKE_CURRENT_SOURCE_DIR}/easyiceconfig/*) | ||
|
||
string(REGEX REPLACE "[^;]+\\.in;?" "" ModuleFiles "${ModuleFiles}") | ||
|
||
|
||
add_custom_target(easyiceconfig_py ALL) | ||
foreach(ModuleFile ${ModuleFiles}) | ||
add_custom_command(TARGET easyiceconfig_py | ||
COMMAND ${CMAKE_COMMAND} -E copy | ||
${CMAKE_CURRENT_SOURCE_DIR}/easyiceconfig/${ModuleFile} ${CMAKE_CURRENT_BINARY_DIR}/easyiceconfig/${ModuleFile} | ||
) | ||
endforeach(ModuleFile ${ModuleFiles}) | ||
|
||
### Install | ||
install(DIRECTORY easyiceconfig | ||
DESTINATION /usr/lib/python2.7/ | ||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/easyiceconfig | ||
DESTINATION ${PYTHON_MODULE_PATH} | ||
COMPONENT core | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters