How to port a qmake project to cmake

孤街醉人 提交于 2019-12-03 21:57:41

After sacrificing some of the modularity and complexity of the Tool.pro file above, I was able to build the project using cmake. Here's the CMakeLists.txt file that I wrote:

project( slugs )

cmake_minimum_required( VERSION 2.6 )

add_definitions ( -Wall )
add_definitions ( -D USE_CUDD )

set ( BDDFLAGS "-mtune=native -malign-double -DHAVE_IEEE_754 -DBSD -DCUDD_COMPILER_OPTIONS_SET" ) # hardcoded for x86_64
add_definitions ( ${BDDFLAGS} )

set ( CMAKE_BUILD_TYPE Debug )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=gnu++0x -Wall -Wextra ${BDDFLAGS}")

include_directories ( ../lib/cudd-2.5.0/include BFAbstractionLibrary )

set ( slugs_HDRS
    BFAbstractionLibrary/BF.h
    BFAbstractionLibrary/BFCudd.h
    gr1context.hpp
    variableTypes.hpp
    variableManager.hpp
    extensionExtractExplicitStrategy.hpp
    extensionRoboticsSemantics.hpp
    extensionWeakenSafetyAssumptions.hpp
    extensionBiasForAction.hpp
    extensionComputeCNFFormOfTheSpecification.hpp
    extensionCounterstrategy.hpp
    extensionExtractExplicitCounterstrategy.hpp
    extensionIncrementalSynthesis.hpp
    extensionFixedPointRecycling.hpp
    extensionInteractiveStrategy.hpp
    extensionIROSfastslow.hpp
    extensionAnalyzeInitialPositions.hpp
    extensionAnalyzeAssumptions.hpp
    BFAbstractionLibrary/BFCuddMintermEnumerator.h
    extensionComputeInterestingRunOfTheSystem.hpp
    extensionAnalyzeSafetyLivenessInteraction.hpp
    extensionAbstractWinningTraceGenerator.hpp
    extensionInterleave.hpp
    extensionPermissiveExplicitStrategy.hpp
    extensionIncompleteInformationEstimatorSynthesis.hpp
    extensionNondeterministicMotion.hpp
    extensionExtractSymbolicStrategy.hpp
    extensionTwoDimensionalCost.hpp
    )

set ( slugs_SRCS
    main.cpp
    BFAbstractionLibrary/bddDump.cpp
    BFAbstractionLibrary/BFCuddVarVector.cpp
    BFAbstractionLibrary/BFCudd.cpp
    BFAbstractionLibrary/BFCuddManager.cpp
    BFAbstractionLibrary/BFCuddVarCube.cpp
    tools.cpp
    synthesisAlgorithm.cpp
    synthesisContextBasics.cpp
    variableManager.cpp
    BFAbstractionLibrary/BFCuddMintermEnumerator.cpp
    )

set ( slugs_LIBS
    -L../lib/cudd-2.5.0/cudd
    -L../lib/cudd-2.5.0/util
    -L../lib/cudd-2.5.0/mtr
    -L../lib/cudd-2.5.0/st
    -L../lib/cudd-2.5.0/dddmp
    -L../lib/cudd-2.5.0/epd
    -lcudd
    -ldddmp
    -lmtr
    -lepd
    -lst
    -lutil
    )

add_executable ( slugs ${slugs_SRCS} )

target_link_libraries (slugs ${slugs_LIBS})
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!