# #============================================================================== # # file : CMakeLists.txt # created : Aug 9 2015 # copyright : (C) 2015 Joe Thompson # email : beaglejoe@users.sourceforge.net # version : $Id:$ # #============================================================================== # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # #============================================================================== # cmake_minimum_required(VERSION 2.8) project(plib C CXX) set(VERSION "1.8.5") include_directories(src/util) include_directories(src/sg) include_directories(src/fnt) include_directories(src/pui) include_directories(src/ssg) ## Font library (fnt) set(fnt_SOURCES src/fnt/fnt.cxx src/fnt/fntBitmap.cxx src/fnt/fntTXF.cxx src/fnt/fnt.h src/fnt/fntLocal.h ) add_library(fnt STATIC ${fnt_SOURCES}) install(FILES src/fnt/fnt.h DESTINATION include/plib) install(TARGETS fnt RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ## Joystick library (js) set(js_SOURCES src/js/js.cxx src/js/jsBSD.cxx src/js/jsLinux.cxx src/js/jsMacOS.cxx src/js/jsMacOSX.cxx src/js/jsNone.cxx src/js/jsWindows.cxx src/js/js.h ) add_library(js STATIC ${js_SOURCES}) install(FILES src/js/js.h DESTINATION include/plib) install(TARGETS js RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ## Network library (net) set(net_SOURCES src/net/netBuffer.cxx src/net/netChannel.cxx src/net/netChat.cxx src/net/netMessage.cxx src/net/netMonitor.cxx src/net/netSocket.cxx ) set(net_HEADERS src/net/net.h src/net/netBuffer.h src/net/netChannel.h src/net/netChat.h src/net/netMessage.h src/net/netMonitor.h src/net/netSocket.h ) add_library(net STATIC ${net_SOURCES} ${net_HEADERS}) install(FILES ${net_HEADERS} DESTINATION include/plib) install(TARGETS net RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ## PLIB Scripting library (psl) set(psl_SOURCES src/psl/psl.cxx src/psl/pslCodeGen.cxx src/psl/pslCompiler.cxx src/psl/pslContext.cxx src/psl/pslDump.cxx src/psl/pslError.cxx src/psl/pslExpression.cxx src/psl/pslFileIO.cxx src/psl/pslProgram.cxx src/psl/pslSymbols.cxx src/psl/pslToken.cxx ) set(psl_HEADERS src/psl/psl.h src/psl/pslCompiler.h src/psl/pslContext.h src/psl/pslLocal.h src/psl/pslFileIO.h src/psl/pslOpcodes.h src/psl/pslSymbol.h ) add_library(psl STATIC ${psl_SOURCES} ${psl_HEADERS}) install(FILES src/psl/psl.h DESTINATION include/plib) install(TARGETS psl RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ## PUI Auxiliary library (puAux) set(puAux_SOURCES src/puAux/puAux.cxx src/puAux/puAuxBiSlider.cxx src/puAux/puAuxBiSliderWithEnds.cxx src/puAux/puAuxComboBox.cxx src/puAux/puAuxCompass.cxx src/puAux/puAuxFileSelector.cxx src/puAux/puAuxLargeInput.cxx src/puAux/puAuxList.cxx src/puAux/puAuxScrollBar.cxx src/puAux/puAuxSelectBox.cxx src/puAux/puAuxSliderWithInput.cxx src/puAux/puAuxSpinBox.cxx src/puAux/puAuxTriSlider.cxx src/puAux/puAuxVerticalMenu.cxx ) set(puAux_HEADERS src/puAux/puAux.h src/puAux/puAuxLocal.h ) add_library(puAux STATIC ${puAux_SOURCES} ${puAux_HEADERS}) install(FILES src/puAux/puAux.h DESTINATION include/plib) install(TARGETS puAux RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ## Picoscopic User Interface library (pui) set(pui_SOURCES src/pui/pu.cxx src/pui/puArrowButton.cxx src/pui/puBox.cxx src/pui/puButton.cxx src/pui/puButtonBox.cxx src/pui/puDial.cxx src/pui/puDialogBox.cxx src/pui/puFont.cxx src/pui/puFrame.cxx src/pui/puGroup.cxx src/pui/puInput.cxx src/pui/puInputBase.cxx src/pui/puInterface.cxx src/pui/puListBox.cxx src/pui/puMenuBar.cxx src/pui/puObject.cxx src/pui/puOneShot.cxx src/pui/puPopup.cxx src/pui/puPopupMenu.cxx src/pui/puRange.cxx src/pui/puSlider.cxx src/pui/puText.cxx src/pui/puValue.cxx ) set(pui_HEADERS src/pui/pu.h src/pui/puFLTK.h src/pui/puGLUT.h # src/pui/puLocal.h src/pui/puNative.h src/pui/puPW.h src/pui/puSDL.h ) add_library(pui STATIC ${pui_SOURCES} ${pui_HEADERS} src/pui/puLocal.h) install(FILES ${pui_HEADERS} DESTINATION include/plib) install(TARGETS pui RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ## PLIB Windowing library (pw) add_library(pw STATIC src/pw/pw.h src/pw/pwWindows.cxx) install(FILES src/pw/pw.h DESTINATION include/plib) install(TARGETS pw RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ## Standard Geometry library (sg) set(sg_SOURCES src/sg/sg.cxx src/sg/sgd.cxx src/sg/sgdIsect.cxx src/sg/sgIsect.cxx src/sg/sgPerlinNoise.cxx ) set(sg_HEADERS src/sg/sg.h ) add_library(sg STATIC ${sg_SOURCES} ${sg_HEADERS}) install(FILES ${sg_HEADERS} DESTINATION include/plib) install(TARGETS sg RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ## Sound library (sl) set(sl_SOURCES src/sl/slDSP.cxx src/sl/slEnvelope.cxx src/sl/slMODdacio.cxx src/sl/slMODfile.cxx src/sl/slMODinst.cxx src/sl/slMODnote.cxx src/sl/slMODPlayer.cxx src/sl/slPlayer.cxx src/sl/slSample.cxx src/sl/slSamplePlayer.cxx src/sl/slScheduler.cxx src/sl/smMixer.cxx ) set(sl_HEADERS src/sl/sl.h src/sl/slMODfile.h src/sl/slMODPrivate.h src/sl/slPortability.h src/sl/sm.h ) add_library(sl STATIC ${sl_SOURCES} ${sl_HEADERS}) install(FILES src/sl/sl.h src/sl/slPortability.h src/sl/sm.h DESTINATION include/plib) install(TARGETS sl RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ## Simple Scene Graph library (ssg) set(ssg_SOURCES src/ssg/ssg.cxx src/ssg/ssgAnimation.cxx src/ssg/ssgAnimTransform.cxx src/ssg/ssgAxisTransform.cxx src/ssg/ssgBase.cxx src/ssg/ssgBaseTransform.cxx src/ssg/ssgBranch.cxx src/ssg/ssgContext.cxx src/ssg/ssgCutout.cxx src/ssg/ssgDList.cxx src/ssg/ssgEntity.cxx src/ssg/ssgInvisible.cxx src/ssg/ssgIO.cxx src/ssg/ssgIsect.cxx src/ssg/ssgLeaf.cxx src/ssg/ssgList.cxx src/ssg/ssgLoad.cxx src/ssg/ssgLoad3ds.cxx src/ssg/ssgLoadAC.cxx src/ssg/ssgLoadASC.cxx src/ssg/ssgLoadASE.cxx src/ssg/ssgLoadATG.cxx src/ssg/ssgLoadBMP.cxx src/ssg/ssgLoadDOF.cxx src/ssg/ssgLoadDXF.cxx src/ssg/ssgLoaderWriterStuff.cxx src/ssg/ssgLoadFLT.cxx src/ssg/ssgLoadIV.cxx src/ssg/ssgLoadM.cxx src/ssg/ssgLoadMD2.cxx src/ssg/ssgLoadMDL.cxx src/ssg/ssgLoadMDL_BGLTexture.cxx src/ssg/ssgLoadOBJ.cxx src/ssg/ssgLoadOFF.cxx src/ssg/ssgLoadPCX.cxx src/ssg/ssgLoadPNG.cxx src/ssg/ssgLoadSGI.cxx src/ssg/ssgLoadSSG.cxx src/ssg/ssgLoadStrip.cxx src/ssg/ssgLoadTexture.cxx src/ssg/ssgLoadTGA.cxx src/ssg/ssgLoadTRI.cxx src/ssg/ssgLoadVRML1.cxx src/ssg/ssgLoadX.cxx src/ssg/ssgLoadXPlaneObj.cxx src/ssg/ssgOptimiser.cxx src/ssg/ssgParser.cxx src/ssg/ssgRangeSelector.cxx src/ssg/ssgRoot.cxx src/ssg/ssgSave3ds.cxx src/ssg/ssgSaveAC.cxx src/ssg/ssgSaveASC.cxx src/ssg/ssgSaveASE.cxx src/ssg/ssgSaveATG.cxx src/ssg/ssgSaveDXF.cxx src/ssg/ssgSaveFLT.cxx src/ssg/ssgSaveIV.cxx src/ssg/ssgSaveM.cxx src/ssg/ssgSaveOBJ.cxx src/ssg/ssgSaveOFF.cxx src/ssg/ssgSaveQHI.cxx src/ssg/ssgSaveTRI.cxx src/ssg/ssgSaveVRML1.cxx src/ssg/ssgSaveX.cxx src/ssg/ssgSelector.cxx src/ssg/ssgSimpleList.cxx src/ssg/ssgSimpleState.cxx src/ssg/ssgState.cxx src/ssg/ssgStateSelector.cxx src/ssg/ssgStateTables.cxx src/ssg/ssgStatistics.cxx src/ssg/ssgStats.cxx src/ssg/ssgTexTrans.cxx src/ssg/ssgTexture.cxx src/ssg/ssgTransform.cxx src/ssg/ssgTween.cxx src/ssg/ssgTweenController.cxx src/ssg/ssgVertSplitter.cxx src/ssg/ssgVTable.cxx src/ssg/ssgVtxArray.cxx src/ssg/ssgVtxTable.cxx ) set(ssg_HEADERS src/ssg/ssg.h src/ssg/ssg3ds.h src/ssg/ssgconf.h src/ssg/ssgKeyFlier.h src/ssg/ssgLoaderWriterStuff.h src/ssg/ssgLoadMDL.h src/ssg/ssgLoadVRML.h src/ssg/ssgLocal.h src/ssg/ssgMSFSPalette.h src/ssg/ssgParser.h src/ssg/ssgVertSplitter.h ) add_library(ssg STATIC ${ssg_SOURCES} ${ssg_HEADERS}) install(FILES src/ssg/ssg.h src/ssg/ssgconf.h src/ssg/ssgMSFSPalette.h src/ssg/ssgKeyFlier.h DESTINATION include/plib) install(TARGETS ssg RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ## SSGraph Auxiliary library (ssgAux) set(ssgAux_SOURCES src/ssgAux/ssgaCelestialBody.cxx src/ssgAux/ssgaCloudLayer.cxx src/ssgAux/ssgaFire.cxx src/ssgAux/ssgaLensFlare.cxx src/ssgAux/ssgaLensFlareTexture.cxx src/ssgAux/ssgaParticleSystem.cxx src/ssgAux/ssgaPatch.cxx src/ssgAux/ssgaScreenDump.cxx src/ssgAux/ssgaShapes.cxx src/ssgAux/ssgaSky.cxx src/ssgAux/ssgaSkyDome.cxx src/ssgAux/ssgaSphere.cxx src/ssgAux/ssgaStars.cxx src/ssgAux/ssgaTeapot.cxx src/ssgAux/ssgAux.cxx src/ssgAux/ssgaWaveSystem.cxx ) set(ssgAux_HEADERS src/ssgAux/ssgaFire.h src/ssgAux/ssgaLensFlare.h src/ssgAux/ssgaParticleSystem.h src/ssgAux/ssgaScreenDump.h src/ssgAux/ssgaShapes.h src/ssgAux/ssgaSky.h src/ssgAux/ssgaSphere.h src/ssgAux/ssgAux.h src/ssgAux/ssgaWaveSystem.h ) add_library(ssgAux STATIC ${ssgAux_SOURCES} ${ssgAux_HEADERS}) install(FILES src/ssgAux/ssgAux.h src/ssgAux/ssgaFire.h src/ssgAux/ssgaLensFlare.h src/ssgAux/ssgaParticleSystem.h src/ssgAux/ssgaShapes.h src/ssgAux/ssgaWaveSystem.h src/ssgAux/ssgaSky.h src/ssgAux/ssgaScreenDump.h DESTINATION include/plib) install(TARGETS ssgAux RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ## Utility library (ul) set(ul_SOURCES src/util/ul.cxx src/util/ulClock.cxx src/util/ulError.cxx src/util/ulLinkedList.cxx src/util/ulList.cxx src/util/ulRTTI.cxx ) set(ul_HEADERS src/util/ul.h src/util/ulLocal.h src/util/ulRTTI.h ) add_library(ul STATIC ${ul_SOURCES} ${ul_HEADERS}) install(FILES src/util/ul.h src/util/ulRTTI.h DESTINATION include/plib) install(TARGETS ul RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)