Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ endif()
option(MQT_CORE_INSTALL "Generate installation instructions for MQT Core"
${MQT_CORE_MASTER_PROJECT})
option(BUILD_MQT_CORE_TESTS "Also build tests for the MQT Core project" ${MQT_CORE_MASTER_PROJECT})
option(BUILD_MQT_CORE_SHARED_LIBS "Build MQT Core libraries as shared libraries"
${BUILD_SHARED_LIBS})

# try to determine the project version
include(GetVersion)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ git-only = [
[tool.scikit-build.cmake.define]
BUILD_MQT_CORE_BINDINGS = "ON"
BUILD_MQT_CORE_TESTS = "OFF"
BUILD_SHARED_LIBS = "ON"
BUILD_MQT_CORE_SHARED_LIBS = "ON"

[[tool.scikit-build.overrides]]
if.python-version = ">=3.13"
Expand Down
2 changes: 1 addition & 1 deletion src/algorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if(NOT TARGET ${MQT_CORE_TARGET_NAME}-algorithms)
${MQT_CORE_TARGET_NAME}-algorithms
PUBLIC FILE_SET HEADERS BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/.. FILES
${CMAKE_CURRENT_BINARY_DIR}/mqt_core_algorithms_export.h)
if(NOT BUILD_SHARED_LIBS)
if(NOT BUILD_MQT_CORE_SHARED_LIBS)
target_compile_definitions(${MQT_CORE_TARGET_NAME}-algorithms
PUBLIC MQT_CORE_ALGO_STATIC_DEFINE)
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/circuit_optimizer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if(NOT TARGET ${MQT_CORE_TARGET_NAME}-circuit-optimizer)
${MQT_CORE_TARGET_NAME}-circuit-optimizer
PUBLIC FILE_SET HEADERS BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/.. FILES
${CMAKE_CURRENT_BINARY_DIR}/mqt_core_circuit_optimizer_export.h)
if(NOT BUILD_SHARED_LIBS)
if(NOT BUILD_MQT_CORE_SHARED_LIBS)
target_compile_definitions(${MQT_CORE_TARGET_NAME}-circuit-optimizer
PUBLIC MQT_CORE_CIRCUIT_OPTIMIZER_STATIC_DEFINE)
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/datastructures/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if(NOT TARGET ${MQT_CORE_TARGET_NAME}-ds)
target_sources(
${MQT_CORE_TARGET_NAME}-ds PUBLIC FILE_SET HEADERS BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/..
FILES ${CMAKE_CURRENT_BINARY_DIR}/mqt_core_ds_export.h)
if(NOT BUILD_SHARED_LIBS)
if(NOT BUILD_MQT_CORE_SHARED_LIBS)
target_compile_definitions(${MQT_CORE_TARGET_NAME}-ds PUBLIC MQT_CORE_DS_STATIC_DEFINE)
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/dd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if(NOT TARGET ${MQT_CORE_TARGET_NAME}-dd)
target_sources(
${MQT_CORE_TARGET_NAME}-dd PUBLIC FILE_SET HEADERS BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/..
FILES ${CMAKE_CURRENT_BINARY_DIR}/mqt_core_dd_export.h)
if(NOT BUILD_SHARED_LIBS)
if(NOT BUILD_MQT_CORE_SHARED_LIBS)
target_compile_definitions(${MQT_CORE_TARGET_NAME}-dd PUBLIC MQT_CORE_DD_STATIC_DEFINE)
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/ir/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if(NOT TARGET MQT::CoreIR)
target_sources(
${MQT_CORE_TARGET_NAME}-ir PUBLIC FILE_SET HEADERS BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/..
FILES ${CMAKE_CURRENT_BINARY_DIR}/mqt_core_ir_export.h)
if(NOT BUILD_SHARED_LIBS)
if(NOT BUILD_MQT_CORE_SHARED_LIBS)
target_compile_definitions(${MQT_CORE_TARGET_NAME}-ir PUBLIC MQT_CORE_IR_STATIC_DEFINE)
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/na/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if(NOT TARGET ${MQT_CORE_TARGET_NAME}-na)
target_sources(
${MQT_CORE_TARGET_NAME}-na PUBLIC FILE_SET HEADERS BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/..
FILES ${CMAKE_CURRENT_BINARY_DIR}/mqt_core_na_export.h)
if(NOT BUILD_SHARED_LIBS)
if(NOT BUILD_MQT_CORE_SHARED_LIBS)
target_compile_definitions(${MQT_CORE_TARGET_NAME}-na PUBLIC MQT_CORE_NA_STATIC_DEFINE)
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/qasm3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if(NOT TARGET MQT::CoreQASM)
target_sources(
${MQT_CORE_TARGET_NAME}-qasm PUBLIC FILE_SET HEADERS BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/..
FILES ${CMAKE_CURRENT_BINARY_DIR}/mqt_core_qasm_export.h)
if(NOT BUILD_SHARED_LIBS)
if(NOT BUILD_MQT_CORE_SHARED_LIBS)
target_compile_definitions(${MQT_CORE_TARGET_NAME}-qasm PUBLIC MQT_CORE_QASM_STATIC_DEFINE)
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/zx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ if(NOT TARGET ${MQT_CORE_TARGET_NAME}-zx)
target_sources(
${MQT_CORE_TARGET_NAME}-zx PUBLIC FILE_SET HEADERS BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/..
FILES ${CMAKE_CURRENT_BINARY_DIR}/mqt_core_zx_export.h)
if(NOT BUILD_SHARED_LIBS)
if(NOT BUILD_MQT_CORE_SHARED_LIBS)
target_compile_definitions(${MQT_CORE_TARGET_NAME}-zx PUBLIC MQT_CORE_ZX_STATIC_DEFINE)
endif()

Expand Down
Loading