mirror of
https://github.com/triqs/dft_tools
synced 2024-12-25 22:03:43 +01:00
Fix cmake so that -DMATHJAX_PATH works
modified: CMakeLists.txt modified: cmake/FindMathJax.cmake
This commit is contained in:
parent
dade89f60d
commit
a5b122d91a
@ -305,24 +305,6 @@ EXECUTE_PROCESS(COMMAND id -un OUTPUT_VARIABLE WhoAmI RESULT_VARIABLE returncode
|
|||||||
set(TRIQS_HOSTNAME ${myHostName})
|
set(TRIQS_HOSTNAME ${myHostName})
|
||||||
set(TRIQS_COMPILEDBY ${WhoAmI})
|
set(TRIQS_COMPILEDBY ${WhoAmI})
|
||||||
|
|
||||||
# TRIQS cmake file and config.h
|
|
||||||
message( STATUS "-------- Making TRIQSConfig.cmake -------------")
|
|
||||||
get_property(ALL_DEFS GLOBAL PROPERTY TRIQS_COMPIL_DEFINITIONS)
|
|
||||||
configure_file(./cmake/triqs_config.h.in Config/triqs_config.h @ONLY)
|
|
||||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|
||||||
configure_file(./cmake/TRIQSConfig.cmake.in Config/TRIQSConfig.cmake @ONLY)
|
|
||||||
else()
|
|
||||||
configure_file(./cmake/TRIQSConfig.cmake.in Config/TRIQSConfig1.cmake @ONLY )
|
|
||||||
EXEC_PYTHON_SCRIPT( "import re;open('${CMAKE_CURRENT_BINARY_DIR}/Config/TRIQSConfig.cmake','w').write(re.sub(r';*\\s*-framework\\s+([a-zA-Z_][a-zA-Z_0-9]*)',r' \"-framework \\1\"',open('${CMAKE_CURRENT_BINARY_DIR}/Config/TRIQSConfig1.cmake').read()))", ConfigFile)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Config/TRIQSConfig.cmake DESTINATION share/triqs/cmake)
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Config/triqs_config.h DESTINATION include/triqs)
|
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/cmake/FindTRIQS.cmake DESTINATION share/triqs/cmake)
|
|
||||||
|
|
||||||
configure_file(./cmake/FindTriqsTest.cmake.in Config//FindTriqsTest.cmake @ONLY)
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Config/FindTriqsTest.cmake DESTINATION share/triqs/cmake)
|
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/cmake/run_test.cmake DESTINATION share/triqs/cmake)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
enable_testing()
|
enable_testing()
|
||||||
@ -405,6 +387,28 @@ endif (Build_Documentation)
|
|||||||
|
|
||||||
install (FILES ${CMAKE_SOURCE_DIR}/cmake/FindTRIQS.cmake DESTINATION share/triqs/cmake)
|
install (FILES ${CMAKE_SOURCE_DIR}/cmake/FindTRIQS.cmake DESTINATION share/triqs/cmake)
|
||||||
|
|
||||||
|
#------------------------
|
||||||
|
# TRIQS cmake file and config.h
|
||||||
|
#------------------------
|
||||||
|
|
||||||
|
message( STATUS "-------- Making TRIQSConfig.cmake -------------")
|
||||||
|
get_property(ALL_DEFS GLOBAL PROPERTY TRIQS_COMPIL_DEFINITIONS)
|
||||||
|
configure_file(./cmake/triqs_config.h.in Config/triqs_config.h @ONLY)
|
||||||
|
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
|
configure_file(./cmake/TRIQSConfig.cmake.in Config/TRIQSConfig.cmake @ONLY)
|
||||||
|
else()
|
||||||
|
configure_file(./cmake/TRIQSConfig.cmake.in Config/TRIQSConfig1.cmake @ONLY )
|
||||||
|
EXEC_PYTHON_SCRIPT( "import re;open('${CMAKE_CURRENT_BINARY_DIR}/Config/TRIQSConfig.cmake','w').write(re.sub(r';*\\s*-framework\\s+([a-zA-Z_][a-zA-Z_0-9]*)',r' \"-framework \\1\"',open('${CMAKE_CURRENT_BINARY_DIR}/Config/TRIQSConfig1.cmake').read()))", ConfigFile)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Config/TRIQSConfig.cmake DESTINATION share/triqs/cmake)
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Config/triqs_config.h DESTINATION include/triqs)
|
||||||
|
install(FILES ${CMAKE_SOURCE_DIR}/cmake/FindTRIQS.cmake DESTINATION share/triqs/cmake)
|
||||||
|
|
||||||
|
configure_file(./cmake/FindTriqsTest.cmake.in Config//FindTriqsTest.cmake @ONLY)
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Config/FindTriqsTest.cmake DESTINATION share/triqs/cmake)
|
||||||
|
install(FILES ${CMAKE_SOURCE_DIR}/cmake/run_test.cmake DESTINATION share/triqs/cmake)
|
||||||
|
|
||||||
#------------------------
|
#------------------------
|
||||||
# Packaging
|
# Packaging
|
||||||
#------------------------
|
#------------------------
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
# It sets up : MATHJAX_PATH
|
# It sets up : MATHJAX_PATH
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if(NOT DEFINED MATHJAX_PATH)
|
||||||
|
|
||||||
SET(TRIAL_PATHS
|
SET(TRIAL_PATHS
|
||||||
$ENV{MATHJAX_ROOT}
|
$ENV{MATHJAX_ROOT}
|
||||||
${MATHJAX_ROOT}
|
${MATHJAX_ROOT}
|
||||||
@ -17,6 +19,8 @@ SET(TRIAL_PATHS
|
|||||||
)
|
)
|
||||||
FIND_PATH(MATHJAX_PATH MathJax.js ${TRIAL_PATHS} DOC "Root Path of MathJax")
|
FIND_PATH(MATHJAX_PATH MathJax.js ${TRIAL_PATHS} DOC "Root Path of MathJax")
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
mark_as_advanced(MATHJAX_PATH)
|
mark_as_advanced(MATHJAX_PATH)
|
||||||
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MATHJAX DEFAULT_MSG MATHJAX_PATH)
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MATHJAX DEFAULT_MSG MATHJAX_PATH)
|
||||||
|
Loading…
Reference in New Issue
Block a user