-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
39 lines (31 loc) · 1.37 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# set required cmake version
cmake_minimum_required(VERSION 3.19...3.28)
# detailed description
project(
mqt-ddvis
VERSION 1.7.0
DESCRIPTION "MQT DDVis - A Tool for Visualizing Decision Diagrams for Quantum Computing"
LANGUAGES CXX)
# enable PIC generation
set(CMAKE_POSITION_INDEPENDENT_CODE
ON
CACHE BOOL "Build Position Independent Code")
# add submodule directory. this automatically adds the appropriate targets and include files
include(cmake/ExternalDependencies.cmake)
# create executable
add_library(${PROJECT_NAME} SHARED cpp/module/module.cpp cpp/module/QDDVer.cpp cpp/module/QDDVer.h
cpp/module/QDDVis.cpp cpp/module/QDDVis.h)
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
# include directories
target_include_directories(${PROJECT_NAME} PUBLIC cpp/module)
# link the QFR library and the project options and warnings.
target_link_libraries(${PROJECT_NAME} PRIVATE MQT::CoreDD MQT::ProjectOptions MQT::ProjectWarnings)
target_include_directories(${PROJECT_NAME} SYSTEM PRIVATE ${CMAKE_JS_INC})
target_link_libraries(${PROJECT_NAME} ${CMAKE_JS_LIB})
if(MSVC
AND CMAKE_JS_NODELIB_DEF
AND CMAKE_JS_NODELIB_TARGET)
# Generate node.lib
execute_process(COMMAND ${CMAKE_AR} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET}
${CMAKE_STATIC_LINKER_FLAGS})
endif()