Skip to content

Commit

Permalink
Revert "Moving source files to the src folder"
Browse files Browse the repository at this point in the history
This reverts commit b176db9.
  • Loading branch information
Ignotus committed Apr 3, 2015
1 parent 2b5582a commit 5fd3f22
Show file tree
Hide file tree
Showing 84 changed files with 3,975 additions and 29 deletions.
146 changes: 145 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,149 @@ include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)

find_package(Qt5 REQUIRED
Core
Widgets
)

add_subdirectory(src)
find_package(Boost 1.55 REQUIRED)
find_package(KF5 REQUIRED COMPONENTS
TextWidgets
XmlGui
KDELibs4Support
)

find_package(KF5KDEGames 4.9.0 REQUIRED)

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${KDEGAMES_INCLUDE_DIRS}
${QT_INCLUDES}
${Boost_INCLUDE_DIR}
)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fexceptions")

set(PLUGIN_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/plugins)
set(KDOTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})

set(INSTALL_PREFIX "/usr")

set(PLUGINS_DIR ${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_PLUGINDIR}/kdots)

message(STATUS "Setting plugin directory as ${PLUGINS_DIR}")

set(KDOTSLIB_SRCS
point.cpp
graphpoint.cpp
graph.cpp
boardmodel.cpp
stepqueue.cpp
polygon.cpp
polygonfinder.cpp
gameconfig.cpp
)

set(KDOTSLIB_HEADERS
graphpoint.hpp
graph.hpp
boardmodel.hpp
stepqueue.hpp
edgelist.hpp
point.hpp
constants.hpp
polygon.hpp
polygonfinder.hpp
gameconfig.hpp
iboardview.hpp
)

set(SRCS
pluginloader.cpp
pluginmanagerwidget.cpp
newgamewidget.cpp
newgamedialog.cpp
mainwindow.cpp
boardview.cpp
pluginwidgetdelegate.cpp
brushcombo.cpp
brushcombodelegate.cpp
main.cpp
kdots.kcfgc
)

set(HEADERS
pluginloader.hpp
pluginmanagerwidget.hpp
newgamedialog.hpp
newgamewidget.hpp
mainwindow.hpp
boardview.hpp
pluginwidgetdelegate.hpp
brushcombo.hpp
brushcombodelegate.hpp
)

set(INTERFACE_HEAD
interface/iplugin.hpp
interface/irival.hpp
interface/iconfigurationwidget.hpp
)

set(FORMS
ui/mainwindow.ui
ui/newgamewidget.ui
ui/newgamedialog.ui
ui/pluginmanagerwidget.ui
ui/boardconfigwidget.ui
)


ki18n_wrap_ui(SRCS ${FORMS})
kconfig_add_kcfg_files(SRCS kdots.kcfgc)
install(FILES kdots.kcfg DESTINATION ${KCFG_INSTALL_DIR})

set(KDOTS_VERSION "0.5.3")
set(KDOTS_SOVERSION "1")

configure_file(config.hpp.in config.hpp)

set(KDOTS_REQUIRED_LIBS
${KDEGAMES_LIBRARY}
${QT_LIBRARIES}
${Boost_LIBRARIES}
KF5::TextWidgets
KF5::XmlGui
KF5::KDELibs4Support
)

add_library(kdotslib SHARED
${KDOTSLIB_SRCS}
)

add_executable(kdots
${SRCS}
${INTERFACE_HEAD}
)

target_link_libraries(kdotslib
${KDOTS_REQUIRED_LIBS}
)

set_target_properties(kdotslib
PROPERTIES VERSION ${KDOTS_VERSION} SOVERSION ${KDOTS_SOVERSION}
)

target_link_libraries(kdots
${KDOTS_REQUIRED_LIBS}
kdotslib
)

install(TARGETS kdots DESTINATION ${BIN_INSTALL_DIR})
install(TARGETS kdotslib DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES kdotsui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kdots)
install(PROGRAMS kdots.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})

add_subdirectory(plugins)
4 changes: 2 additions & 2 deletions Messages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# invoke the extractrc script on all .ui, .rc, and .kcfg files in the sources
# the results are stored in a pseudo .cpp file to be picked up by xgettext.
$EXTRACTRC `find src/ -name \*.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp
$EXTRACTRC `find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp
# call xgettext on all source files. If your sources have other filename
# extensions besides .cpp, and .h, just add them in the find call.
$XGETTEXT `find src/ -name \*.cpp -o -name \*.h` -o $podir/kdots.pot
$XGETTEXT `find . -name \*.cpp -o -name \*.h` -o $podir/kdots.pot
Loading

0 comments on commit 5fd3f22

Please sign in to comment.