Skip to content

Commit

Permalink
fix: inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Jun 9, 2024
1 parent f31f6f1 commit 99a3199
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 29 deletions.
20 changes: 1 addition & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
project(
ViennaPS
LANGUAGES CXX
LANGUAGES CXX C
VERSION 2.0.2)

# --------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -88,24 +88,6 @@ target_include_directories(
${PROJECT_NAME} INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/viennaps>
$<INSTALL_INTERFACE:include/viennaps-${PROJECT_VERSION}>)

# --------------------------------------------------------------------------------------------------------
# Check whether or not dependencies are installed on the system
# └ VTK/OpenMP require C Language support
# --------------------------------------------------------------------------------------------------------

enable_language(C)

find_package(ViennaRay QUIET)
find_package(ViennaLS QUIET)

set(VIENNAPS_SYSTEM_VIENNARAY
${ViennaRay_FOUND}
CACHE INTERNAL "")

set(VIENNAPS_SYSTEM_VIENNALS
${ViennaLS_FOUND}
CACHE INTERNAL "")

# --------------------------------------------------------------------------------------------------------
# Setup Dependencies
# --------------------------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ add_custom_target(ViennaPS_Examples ALL)

if(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${PROJECT_BINARY_DIR}/examples>)
setup_vtk_env(ViennaLS_Tests ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
setup_vtk_env(ViennaPS_Tests ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()

viennacore_add_subdirs(${CMAKE_CURRENT_LIST_DIR})
5 changes: 3 additions & 2 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ if(NOT VIENNAPS_PACKAGE_PYTHON)
return()
endif()

setup_embree_env(${MODULE_NAME} "${VIENNAPS_LIB_FOLDER}")
setup_tbb_env(${MODULE_NAME} "${VIENNAPS_LIB_FOLDER}")
# Not required for both targets, one will suffice
setup_embree_env(viennaps2d "${VIENNAPS_LIB_FOLDER}")
setup_tbb_env(viennaps2d "${VIENNAPS_LIB_FOLDER}")

install(DIRECTORY "${VIENNAPS_LIB_FOLDER}" DESTINATION .)
7 changes: 1 addition & 6 deletions python/__init__.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,8 @@ import sys
def _windows_dll_path():

import os
import vtk

vtk_path = vtk.__path__[0]

additional_paths = [
vtk_path,
os.path.join(os.path.dirname(vtk_path), 'vtk.libs'),
os.path.join(os.path.dirname(os.path.dirname(__file__)), 'viennaps.libs')
]

Expand All @@ -30,7 +25,7 @@ def _windows_dll_path():
if sys.platform == "win32":
_windows_dll_path()

from .@MODULE_NAME@ import *
from .@NAME@ import *

# Config file reader helper function
def ReadConfigFile(fileName: str):
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ add_custom_target(ViennaPS_Tests ALL)

if(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${PROJECT_BINARY_DIR}/tests>)
setup_vtk_env(ViennaLS_Tests ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
setup_vtk_env(ViennaPS_Tests ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()

viennacore_add_subdirs(${CMAKE_CURRENT_LIST_DIR})

0 comments on commit 99a3199

Please sign in to comment.