From b9dc6d0b947a2287d6761e0b0a35525dd0fe7e7f Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Thu, 21 Feb 2019 04:09:41 -0500 Subject: FIX: directory links, install instructions --- src/CMakeLists.txt | 1 + src/Python/CMakeLists.txt | 24 ++++++++++++------------ src/Python/setup-regularisers.py.in | 24 ++++++++++++------------ 3 files changed, 25 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bdcb8f4..5fe1a57 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +add_subdirectory(Core) if (BUILD_MATLAB_WRAPPER) add_subdirectory(Matlab) endif() diff --git a/src/Python/CMakeLists.txt b/src/Python/CMakeLists.txt index c2ef855..ab95ecc 100644 --- a/src/Python/CMakeLists.txt +++ b/src/Python/CMakeLists.txt @@ -7,7 +7,7 @@ project(regulariserPython) # The version number. #set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) - +message("Creating Python Wrapper") # conda orchestrated build message("CIL_VERSION: ${CIL_VERSION}") #include (GenerateExportHeader) @@ -19,7 +19,7 @@ endif() ## Build the regularisers package as a library -message("Creating Regularisers as shared library") +#TODO message("Creating Regularisers as shared library") message("CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}") @@ -87,7 +87,7 @@ if (PYTHONINTERP_FOUND) set(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup-regularisers.py.in") set(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup-regularisers.py") #set(DEPS "${CMAKE_CURRENT_SOURCE_DIR}/module/__init__.py") - set (DEPS "${CMAKE_BINARY_DIR}/Core/") + set (DEPS "${CMAKE_BINARY_DIR}/src/Core/") set(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp") configure_file(${SETUP_PY_IN} ${SETUP_PY}) @@ -99,9 +99,9 @@ if (PYTHONINTERP_FOUND) COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/ccpi ${CMAKE_CURRENT_BINARY_DIR}/ccpi COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} - PREFIX=${CMAKE_SOURCE_DIR}/Core - LIBRARY_INC=${CMAKE_SOURCE_DIR}/Core - LIBRARY_LIB=${CMAKE_BINARY_DIR}/Core + PREFIX=${CMAKE_SOURCE_DIR}/src/Core + LIBRARY_INC=${CMAKE_SOURCE_DIR}/src/Core + LIBRARY_LIB=${CMAKE_BINARY_DIR}/src/Core ${PYTHON_EXECUTABLE} ${SETUP_PY} install COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT} DEPENDS cilreg) @@ -112,9 +112,9 @@ if (PYTHONINTERP_FOUND) COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/ccpi ${CMAKE_CURRENT_BINARY_DIR}/ccpi COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} - PREFIX=${CMAKE_SOURCE_DIR}/Core - LIBRARY_INC=${CMAKE_SOURCE_DIR}/Core - LIBRARY_LIB=${CMAKE_BINARY_DIR}/Core/${CMAKE_BUILD_TYPE} + PREFIX=${CMAKE_SOURCE_DIR}/src/Core + LIBRARY_INC=${CMAKE_SOURCE_DIR}/src/Core + LIBRARY_LIB=${CMAKE_BINARY_DIR}/src/Core/${CMAKE_BUILD_TYPE} ${PYTHON_EXECUTABLE} ${SETUP_PY} build_ext --inplace COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT} DEPENDS cilreg) @@ -123,9 +123,9 @@ if (PYTHONINTERP_FOUND) COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/ccpi ${CMAKE_CURRENT_BINARY_DIR}/ccpi COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} - PREFIX=${CMAKE_SOURCE_DIR}/Core - LIBRARY_INC=${CMAKE_SOURCE_DIR}/Core - LIBRARY_LIB=${CMAKE_BINARY_DIR}/Core + PREFIX=${CMAKE_SOURCE_DIR}/src/Core + LIBRARY_INC=${CMAKE_SOURCE_DIR}/src/Core + LIBRARY_LIB=${CMAKE_BINARY_DIR}/src/Core ${PYTHON_EXECUTABLE} ${SETUP_PY} build_ext --inplace COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT} DEPENDS cilreg) diff --git a/src/Python/setup-regularisers.py.in b/src/Python/setup-regularisers.py.in index 462edda..59be768 100644 --- a/src/Python/setup-regularisers.py.in +++ b/src/Python/setup-regularisers.py.in @@ -34,18 +34,18 @@ extra_libraries = ['cilreg'] print ("extra_library_dirs " , extra_library_dirs) -extra_include_dirs += [os.path.join(".." , ".." , "Core"), - os.path.join(".." , ".." , "Core", "regularisers_CPU"), - os.path.join(".." , ".." , "Core", "inpainters_CPU"), - os.path.join(".." , ".." , "Core", "regularisers_GPU" , "TV_FGP" ) , - os.path.join(".." , ".." , "Core", "regularisers_GPU" , "TV_ROF" ) , - os.path.join(".." , ".." , "Core", "regularisers_GPU" , "TV_SB" ) , - os.path.join(".." , ".." , "Core", "regularisers_GPU" , "TGV" ) , - os.path.join(".." , ".." , "Core", "regularisers_GPU" , "LLTROF" ) , - os.path.join(".." , ".." , "Core", "regularisers_GPU" , "NDF" ) , - os.path.join(".." , ".." , "Core", "regularisers_GPU" , "dTV_FGP" ) , - os.path.join(".." , ".." , "Core", "regularisers_GPU" , "DIFF4th" ) , - os.path.join(".." , ".." , "Core", "regularisers_GPU" , "PatchSelect" ) , +extra_include_dirs += [os.path.join(".." , "Core"), + os.path.join(".." , "Core", "regularisers_CPU"), + os.path.join(".." , "Core", "inpainters_CPU"), + os.path.join(".." , "Core", "regularisers_GPU" , "TV_FGP" ) , + os.path.join(".." , "Core", "regularisers_GPU" , "TV_ROF" ) , + os.path.join(".." , "Core", "regularisers_GPU" , "TV_SB" ) , + os.path.join(".." , "Core", "regularisers_GPU" , "TGV" ) , + os.path.join(".." , "Core", "regularisers_GPU" , "LLTROF" ) , + os.path.join(".." , "Core", "regularisers_GPU" , "NDF" ) , + os.path.join(".." , "Core", "regularisers_GPU" , "dTV_FGP" ) , + os.path.join(".." , "Core", "regularisers_GPU" , "DIFF4th" ) , + os.path.join(".." , "Core", "regularisers_GPU" , "PatchSelect" ) , "."] if platform.system() == 'Windows': -- cgit v1.2.3