mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
62 lines
2.1 KiB
CMake
62 lines
2.1 KiB
CMake
|
|
option(RDK_BUILD_QT_SUPPORT "build support for QT drawing" OFF )
|
|
option(RDK_BUILD_QT_DEMO "build the QT drawing demo" OFF )
|
|
option(RDK_BUILD_CAIRO_SUPPORT "build support for Cairo drawing" OFF )
|
|
|
|
|
|
rdkit_headers(MolDraw2D.h
|
|
MolDraw2DSVG.h
|
|
MolDraw2Dwx.h
|
|
MolDraw2DUtils.h
|
|
MolDraw2DDetails.h
|
|
DEST GraphMol/MolDraw2D
|
|
)
|
|
|
|
rdkit_library(MolDraw2D MolDraw2D.cpp MolDraw2DSVG.cpp
|
|
MolDraw2DDetails.cpp MolDraw2DUtils.cpp
|
|
LINK_LIBRARIES
|
|
ChemReactions FileParsers SmilesParse Depictor MolTransforms RDGeometryLib
|
|
RDGeneral SubstructMatch Subgraphs GraphMol EigenSolvers
|
|
RDGeometryLib
|
|
${RDKit_THREAD_LIBS} )
|
|
|
|
if(RDK_BUILD_QT_SUPPORT)
|
|
#find_package(Qt5 COMPONENTS Widgets OpenGL REQUIRED)
|
|
find_package(Qt5Widgets REQUIRED)
|
|
find_package(Qt5OpenGL REQUIRED)
|
|
|
|
target_sources(MolDraw2D PRIVATE MolDraw2DQt.cpp)
|
|
target_include_directories(MolDraw2D PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS})
|
|
target_compile_options(MolDraw2D PRIVATE "-std=c++11")
|
|
target_link_libraries(MolDraw2D PUBLIC ${Qt5Widgets_LIBRARIES} ${Qt5OpenGL_LIBRARIES})
|
|
rdkit_headers(MolDraw2DQt.h DEST GraphMol/MolDraw2D)
|
|
endif(RDK_BUILD_QT_SUPPORT)
|
|
|
|
if(RDK_BUILD_CAIRO_SUPPORT)
|
|
find_package(Cairo REQUIRED)
|
|
target_include_directories(MolDraw2D PUBLIC ${CAIRO_INCLUDE_DIRS})
|
|
target_compile_definitions(MolDraw2D PUBLIC "-DRDK_CAIRO_BUILD")
|
|
target_link_libraries(MolDraw2D PUBLIC ${CAIRO_LIBRARIES})
|
|
target_sources(MolDraw2D PRIVATE MolDraw2DCairo.cpp)
|
|
rdkit_headers(MolDraw2DCairo.h DEST GraphMol/MolDraw2D)
|
|
endif(RDK_BUILD_CAIRO_SUPPORT)
|
|
|
|
|
|
rdkit_test(moldraw2DTest1 test1.cpp LINK_LIBRARIES
|
|
ChemReactions FileParsers SmilesParse Depictor RDGeometryLib
|
|
RDGeneral SubstructMatch Subgraphs GraphMol MolTransforms EigenSolvers
|
|
RDGeometryLib
|
|
MolDraw2D ${RDKit_THREAD_LIBS} )
|
|
|
|
rdkit_test(moldraw2DRxnTest1 rxn_test1.cpp LINK_LIBRARIES
|
|
ChemReactions FileParsers SmilesParse Depictor RDGeometryLib
|
|
RDGeneral SubstructMatch Subgraphs GraphMol MolTransforms EigenSolvers
|
|
RDGeometryLib
|
|
MolDraw2D ${RDKit_THREAD_LIBS} ${EXTRA_LOCAL_LIBS} )
|
|
|
|
if(RDK_BUILD_QT_DEMO)
|
|
add_subdirectory(QTDemo)
|
|
endif(RDK_BUILD_QT_DEMO)
|
|
|
|
add_subdirectory(Wrap)
|