# CSnake configuration of the CoronaryArteryModelingPlugin # CSNake imports from csnAPIPublic import GetAPI api = GetAPI("2.5.0") # Other dependencies from csnGIMIASDef import * from csnCArteryModellingToolkit import * from csnToolkitOpen import * import csnProject # Definition of the plugin coronaryArteryModelingPlugin = GimiasPluginProject( "CoronaryArteryModelingPlugin", api) # plugin dependencies projects = [ gmCore, guiBridgeLib, baseLibVTK, guiBridgeLibWxWidgets, alglib_v3_10_0 #cArteryModellingLib ] coronaryArteryModelingPlugin.AddProjects(projects) coronaryArteryModelingPlugin.AddProjects([cArteryModellingLib], dependency=False) coronaryArteryModelingPlugin.AddIncludeFolders([ csnProject.ToProject(cArteryModellingLib).GetSourceRootFolder() + "/libmodules/TubularGeodesicComputation/include" ]) coronaryArteryModelingPlugin.AddIncludeFolders([ csnProject.ToProject(cArteryModellingLib).GetSourceRootFolder() + "/libmodules/RotationalAngioIO/include" ]) coronaryArteryModelingPlugin.AddIncludeFolders([
# Csnake project configuration from csnAPIPublic import GetAPI api = GetAPI("2.5.0") three = api.CreateThirdPartyProject("Three") three.SetUseFilePath("%s/Three/UseThree.cmake" % three.GetBuildFolder()) three.SetConfigFilePath("%s/Three/ThreeConfig.cmake" % three.GetBuildFolder())
# Used to configure dummyExe from csnAll import * from csnAPIPublic import GetAPI api = GetAPI("2.5.0") dummyExe = api.CreateStandardModuleProject("DummyExe", "executable") dummyExe.AddSources(["src/DummyExe.cpp"]) dummyExe.AddProjects([dummyLib])
# Project variable definitions from csnAPIPublic import GetAPI api = GetAPI("2.5.0") def dummyLib(): import DummyLib.csnDummyLib return DummyLib.csnDummyLib.dummyLib def cxxTest(): return api.LoadThirdPartyModule('CxxTest', 'csnCxxTest').cxxTest def two(): return api.LoadThirdPartyModule('Two', 'csnTwo').two def three(): return api.LoadThirdPartyModule('Three', 'csnThree').three def four(): return api.LoadThirdPartyModule('Four', 'csnFour').four # Toolkit header ----------------------------------- toolkit = api.CreateCompiledProject("TestToolkit", "library") headerVariables = {"ANSWER_TO_LIFE_THE_UNIVERSE_AND_EVERYTHING": "42"} toolkit.CreateHeader("ToolkitHeader.h", headerVariables, "TESTTK")
# Csnake project configuration from csnAPIPublic import GetAPI api = GetAPI("2.5.0") two = api.CreateThirdPartyProject("Two") two.SetUseFilePath("%s/Two/UseTwo.cmake" % two.GetBuildFolder()) two.SetConfigFilePath("%s/Two/TwoConfig.cmake" % two.GetBuildFolder()) if api.GetCompiler().TargetIsWindows(): two.AddFilesToInstall(["bin\Debug\TwoLib.dll"], debugOnly=1) two.AddFilesToInstall(["bin\Release\TwoLib.dll"], releaseOnly=1)
# Used to configure CxxTest from csnAPIPublic import GetAPI api = GetAPI("2.5.0") cxxTest = api.CreateCompiledProject("CxxTest", "library")
# Csnake project configuration from csnAPIPublic import GetAPI api = GetAPI("2.5.0") from csnAll import three four = api.CreateThirdPartyProject("Four") four.SetUseFilePath("%s/Four/UseFour.cmake" % four.GetBuildFolder()) four.SetConfigFilePath("%s/Four/FourConfig.cmake" % four.GetBuildFolder()) four.AddProjects([three])
# Used to configure dummyLib from csnAll import * from csnAPIPublic import GetAPI import os.path api = GetAPI("2.5.0") # define project dummyLib = api.CreateStandardModuleProject("DummyLib", "library") # dependencies # (four depends on three that should be also added implicitly) dummyLib.AddProjects([two, four, toolkit]) # source folders dummyLib.AddLibraryModules(["dummyLib"]) # applications dummyLib.AddApplications(["myApp"]) # tests dummyLib.AddTests(["tests/DummyTest/*.h"], cxxTest) # creates a dependency on thirdParty/cmakeMacros/PCHSupport_26.cmake found = dummyLib.Glob("*PCH.h") pchFile = os.path.basename(found[0]) dummyLib.SetPrecompiledHeader(pchFile) # add compiler definitions if api.GetCompiler().TargetIsWindows(): dummyLib.AddDefinitions(["-W4 -WX"], private=1) else: dummyLib.AddDefinitions(["-Wall -Werror"], private=1)