diff options
| author | Stelios Tsampas <loathingkernel@gmail.com> | 2017-07-31 16:14:45 +0300 |
|---|---|---|
| committer | Stelios Tsampas <loathingkernel@gmail.com> | 2017-07-31 16:15:15 +0300 |
| commit | 3912ad309e60ca9e97a72baa9a2e651c6a5ab198 (patch) | |
| tree | add0d8226bdbb187512bf1a62162453228417497 /gui | |
| parent | 01f49908879197b1715483321a9490dd71c8874b (diff) | |
| download | pcsxr-3912ad309e60ca9e97a72baa9a2e651c6a5ab198.tar.gz | |
* Import CMake build system from codeplex
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/CMakeLists.txt | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt new file mode 100644 index 00000000..ddb87b25 --- /dev/null +++ b/gui/CMakeLists.txt @@ -0,0 +1,98 @@ +message("Configuring gui") + +include(GlibCompileResourcesSupport) + +#deps + +find_package(GLib REQUIRED) +if(NOT GLib_FOUND) + message(FATAL_ERROR "GLIB2 library not found") +endif(NOT GLib_FOUND) +include_directories(${GLib_INCLUDE_DIRS}) + +find_package(GTK3 3.14.0 REQUIRED) +if(NOT GTK3_FOUND) + message(FATAL_ERROR "GTK3 library not found") +endif(NOT GTK3_FOUND) +include_directories(${GTK3_INCLUDE_DIRS}) +set(GTK_LIBRARIES ${GTK3_LIBRARY} ${GDK3_LIBRARY} ${GDKPixbuf_LIBRARY} ${Pango_LIBRARY} ${Cairo_LIBRARY} ${GObject_LIBRARY} ${GLib_LIBRARY} ${GIO_LIBRARY}) + +find_package(Threads REQUIRED) +find_package(ZLIB REQUIRED) +include_directories(${ZLIB_INCLUDE_DIRS}) + +find_library(DL_LIB dl REQUIRED) +find_library(RT_LIB rt REQUIRED) + +find_package(X11 REQUIRED) +include_directories(${X11_XTest_INCLUDE_PATH}) + + +#defs +add_definitions(-DLOCALE_DIR="${CMAKE_INSTALL_FULL_DATAROOTDIR}/locale/" -DPSEMU_DATA_DIR="${CMAKE_INSTALL_FULL_DATAROOTDIR}/psemu" -DDEF_PLUGIN_DIR="${CMAKE_INSTALL_FULL_LIBDIR}/games/psemu") + +#sources +set(SRCS + AboutDlg.c + Cheat.c + ConfDlg.c + Config.c + DebugMemory.c + GtkGui.c + LnxMain.c + MemcardDlg.c + Plugin.c + resources.c +) + + +#resources +set(RESOURCE_LIST + ${CMAKE_CURRENT_SOURCE_DIR}/data/pcsxr.ui + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-icon.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-cd-open.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-plugin-cdr.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-plugin-gpu.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-iso-open.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-iso-reopen.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-memcard.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-plugin-pad.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-play.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-plugin-sio1.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-run-bios.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-save-state.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-load-state.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-settings.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-plugin-netplay.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-cpu.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-shutdown.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-reset.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-run-exe.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-plugin-spu.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-cheats.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-cheats-search.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-cheats-browse.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-exit.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-about.png + ${CMAKE_CURRENT_SOURCE_DIR}/data/pixmaps/pcsxr-memory-dump.png +) + + +compile_gresources(RESOURCE_FILE + XML_OUT + TYPE EMBED_C + PREFIX /org/pcsxr/gui + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data + RESOURCES ${RESOURCE_LIST}) + +add_custom_target(resource DEPENDS ${RESOURCE_FILE}) +add_executable(pcsxr ${SRCS} ${RESOURCE_FILE} ) +add_dependencies(pcsxr resource) +target_link_libraries(pcsxr pcsxcore ${GTK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES} ${RT_LIB} ${DL_LIB} ${X11_XTest_LIB}) + +install(TARGETS pcsxr RUNTIME DESTINATION bin) +install(FILES data/pcsxr.desktop DESTINATION share/applications) +install(FILES data/pixmaps/pcsxr-icon.png DESTINATION share/icons/hicolor/48x48/apps) + +add_subdirectory("po") |
