#------------------------------------------------------------------- # This file is part of the CMake build system for Scol # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. #------------------------------------------------------------------- ############################################################ # include/Scol core library ############################################################ PROJECT(lib2d24) set (LIB2D24_HEADER_FILES include/objstr.h include/version.h ) if (Scol_STATIC) set (LIB2D24_HEADER_FILES ${LIB2D24_HEADER_FILES} include/loadScolLib2D.h) endif() set (LIB2D24_SOURCE_FILES src/main.cpp ) # define header and source files for the library set (LIB2D24_CORE_HEADER_FILES include/lib2d/keydef.h include/lib2d/lib2Dconf.h include/lib2d/osversion.h include/lib2d/Rect.h include/lib2d/utils.h include/lib2d/Macro.h # Delete this one, use vm instead ) set (LIB2D24_CORE_SOURCE_FILES src/lib2d/keydef.cpp src/lib2d/osversion.cpp src/lib2d/Rect.cpp src/lib2d/utils.cpp ) set (LIB2D24_CONTAINERS_HEADER_FILES include/lib2d/container.h include/lib2d/container_trans.h include/lib2d/window.h ) set (LIB2D24_CONTAINERS_SOURCE_FILES src/lib2d/container.cpp src/lib2d/container_trans.cpp src/lib2d/window.cpp ) set (LIB2D24_GRAPHICS_HEADER_FILES include/lib2d/bitmap.h include/lib2d/CObjBuffer.h include/lib2d/CObjBufferDirectX.h include/lib2d/CObjBufferWindows.h include/lib2d/colors.h # Colors are used in others libs, maybe we could move those functions to vm? include/lib2d/layer.h ) set (LIB2D24_GRAPHICS_SOURCE_FILES src/lib2d/alphaBlit.cpp src/lib2d/bitmap.cpp src/lib2d/classicBlit.cpp src/lib2d/CObjBuffer.cpp src/lib2d/CObjBufferDirectX.cpp src/lib2d/CObjBufferWindows.cpp src/lib2d/colors.cpp src/lib2d/layer.cpp ) set (LIB2D24_LINKS_HEADER_FILES include/lib2d/CObjLink.h include/lib2d/CObjMessage.h include/lib2d/CObjMessageHideAndShow.h include/lib2d/CObjMessageMove.h include/lib2d/CObjMessageResize.h include/lib2d/CObjMessageSelect.h include/lib2d/CObjMessageStringSelect.h ) set (LIB2D24_LINKS_SOURCE_FILES src/lib2d/CObjLink.cpp src/lib2d/CObjMessage.cpp src/lib2d/CObjMessageHideAndShow.cpp src/lib2d/CObjMessageMove.cpp src/lib2d/CObjMessageResize.cpp src/lib2d/CObjMessageSelect.cpp src/lib2d/CObjMessageStringSelect.cpp ) set (LIB2D24_OBJECTS_HEADER_FILES include/lib2d/CObjectBase.h include/lib2d/CObjectBitmap.h include/lib2d/CObjectCheck.h include/lib2d/CObjectCombo.h include/lib2d/CObjectContainer.h include/lib2d/CObjectEditText.h include/lib2d/CObjectLabel.h include/lib2d/CObjectLabelSelect.h include/lib2d/CObjectList.h include/lib2d/CObjectRollOver.h include/lib2d/CObjectSizeBar.h include/lib2d/CObjectSlideBar.h include/lib2d/CObjectText.h include/lib2d/CObjectTree.h include/lib2d/CObjectWindow.h include/lib2d/CObjLayerFont.h include/lib2d/CObjTimer.h include/lib2d/CObjToolTip.h include/lib2d/Text.h ) set (LIB2D24_OBJECTS_SOURCE_FILES src/lib2d/CObjectBase.cpp src/lib2d/CObjectBitmap.cpp src/lib2d/CObjectCheck.cpp src/lib2d/CObjectCombo.cpp src/lib2d/CObjectContainer.cpp src/lib2d/CObjectEditText.cpp src/lib2d/CObjectLabel.cpp src/lib2d/CObjectLabelSelect.cpp src/lib2d/CObjectList.cpp src/lib2d/CObjectRollOver.cpp src/lib2d/CObjectSizeBar.cpp src/lib2d/CObjectSlideBar.cpp src/lib2d/CObjectText.cpp src/lib2d/CObjectTree.cpp src/lib2d/CObjectWindow.cpp src/lib2d/CObjLayerFont.cpp src/lib2d/CObjTimer.cpp src/lib2d/CObjToolTip.cpp src/lib2d/Text.cpp ) set (LIB2D24_HTML_HEADER_FILES include/libHtml/html.h include/libHtml/htmlbitmap.h include/libHtml/htmlcell.h include/libHtml/htmldraw.h include/libHtml/htmlfunctions.h include/libHtml/htmlrow.h include/libHtml/htmltable.h include/libHtml/htmltext.h include/libHtml/htmltree.h include/libHtml/node.h include/libHtml/parser.h include/libHtml/structs.h ) set (LIB2D24_HTML_SOURCE_FILES src/libHtml/html.cpp src/libHtml/htmlbitmap.cpp src/libHtml/htmlcell.cpp src/libHtml/htmldraw.cpp src/libHtml/htmlfunctions.cpp src/libHtml/htmlrow.cpp src/libHtml/htmltable.cpp src/libHtml/htmltext.cpp src/libHtml/htmltree.cpp src/libHtml/parser.cpp ) scol_include_plugin("LIB2D" "${PROJECT_SOURCE_DIR}/include" "loadScolLib2D.h") # Add directories includes include_directories(include include/lib2d include/libHtml) # This is how visual studio directories (or filters) are generated. source_group(Header\ Files\\lib2d FILES ${LIB2D24_CORE_HEADER_FILES}) source_group(Header\ Files\\lib2d\\containers FILES ${LIB2D24_CONTAINERS_HEADER_FILES}) source_group(Header\ Files\\lib2d\\graphics FILES ${LIB2D24_GRAPHICS_HEADER_FILES}) source_group(Header\ Files\\lib2d\\links FILES ${LIB2D24_LINKS_HEADER_FILES}) source_group(Header\ Files\\lib2d\\objects FILES ${LIB2D24_OBJECTS_HEADER_FILES}) source_group(Header\ Files\\libHtml FILES ${LIB2D24_HTML_HEADER_FILES}) # Same thing for sources files source_group(Source\ Files\\lib2d FILES ${LIB2D24_CORE_SOURCE_FILES}) source_group(Source\ Files\\lib2d\\containers FILES ${LIB2D24_CONTAINERS_SOURCE_FILES}) source_group(Source\ Files\\lib2d\\graphics FILES ${LIB2D24_GRAPHICS_SOURCE_FILES}) source_group(Source\ Files\\lib2d\\links FILES ${LIB2D24_LINKS_SOURCE_FILES}) source_group(Source\ Files\\lib2d\\objects FILES ${LIB2D24_OBJECTS_SOURCE_FILES}) source_group(Source\ Files\\libHtml FILES ${LIB2D24_HTML_SOURCE_FILES}) # Add definition for P4 optimizations, warnings removal. add_definitions(-DOPTI_P4 -D_CRT_SECURE_NO_WARNINGS -DLIB2D_EXPORTS -DSCOL) if (Scol_BUILD_WITH_QT) add_definitions(-DSCOL_QT) elseif (Scol_BUILD_WITH_SDL) add_definitions(-DSCOL_SDL) endif () # setup Scol lib2d target add_library(lib2d24 ${Scol_LIB_TYPE} ${LIB2D24_HEADER_FILES} ${LIB2D24_SOURCE_FILES} ${LIB2D24_CORE_HEADER_FILES} ${LIB2D24_CORE_SOURCE_FILES} ${LIB2D24_CONTAINERS_HEADER_FILES} ${LIB2D24_CONTAINERS_SOURCE_FILES} ${LIB2D24_GRAPHICS_HEADER_FILES} ${LIB2D24_GRAPHICS_SOURCE_FILES} ${LIB2D24_LINKS_HEADER_FILES} ${LIB2D24_LINKS_SOURCE_FILES} ${LIB2D24_OBJECTS_HEADER_FILES} ${LIB2D24_OBJECTS_SOURCE_FILES} ${LIB2D24_HTML_HEADER_FILES} ${LIB2D24_HTML_SOURCE_FILES} ) add_dependencies(lib2d24 kernel) # set the dll version. #set_target_properties(lib2d24 PROPERTIES VERSION ${Scol_VERSION} SOVERSION ${Scol_VERSION_MAJOR}) # Redefined min/max functions, no linking needed anymore :) # target_link_libraries(lib2d24 ${LIBRARIES}) # install Scol lib2d24 scol_config_plugin(lib2d24) #install(FILES ${LIB2D24_HEADER_FILES} DESTINATION include/SCOL/plugins/lib2d_24/) #install(FILES ${LIB2D24_CORE_HEADER_FILES} DESTINATION include/SCOL/plugins/lib2d_24/lib2d) #install(FILES ${LIB2D24_CONTAINERS_HEADER_FILES} DESTINATION include/SCOL/plugins/lib2d_24/lib2d) # TODO /containers #install(FILES ${LIB2D24_GRAPHICS_HEADER_FILES} DESTINATION include/SCOL/plugins/lib2d_24/lib2d) # TODO /graphics #install(FILES ${LIB2D24_LINKS_HEADER_FILES} DESTINATION include/SCOL/plugins/lib2d_24/lib2d) # TODO /links #install(FILES ${LIB2D24_OBJECTS_HEADER_FILES} DESTINATION include/SCOL/plugins/lib2d_24/lib2d) # TODO /objects #install(FILES ${LIB2D24_HTML_HEADER_FILES} DESTINATION include/SCOL/plugins/lib2d_24/libHtml)