Skip to content

Commit

Permalink
In progress of updating CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
sahib committed Sep 4, 2011
1 parent f4754a5 commit a66802f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions CMakeLists.txt
@@ -1,29 +1,29 @@
cmake_minimum_required(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(gmpc-glyros C)
INCLUDE(FindPkgConfig)

FIND_PACKAGE(GTK2 REQUIRED)

SET( GMPC_GLYROS_VERSION_MAJOR "0")
SET( GMPC_GLYROS_VERSION_MINOR "1")

message("-- Make sure to install both gmpc-dev/header and libglyr first")
message("-- For simplictiy reasons those are not checked to be installed.")
message("-- Compiling will result in errors otherwise.")

FIND_PACKAGE(GTK2 REQUIRED)

CONFIGURE_FILE(
"src/config.h.in"
"src/config.h"
)
)

# Default to /usr, use -DCMAKE_INSTALL_PREFIX="path" to change it
SET(CMAKE_INSTALL_PREFIX "/usr")
PKG_CHECK_MODULES(GMPCPKG gmpc REQUIRED)

ADD_DEFINITIONS(-Wall -W -Wno-unused-variable -Wno-unused-parameter -Wno-strict-prototypes)
INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
INCLUDE_DIRECTORIES("/usr/include/libmpd-1.0")
INCLUDE_DIRECTORIES("/usr/include/gmpc")
INCLUDE_DIRECTORIES(${GMPCPKG_INCLUDE_DIRS})

ADD_LIBRARY(gmpc-glyros SHARED src/plugin.c)
TARGET_LINK_LIBRARIES(gmpc-glyros glyr)
TARGET_LINK_LIBRARIES(gmpc-glyros glyr) # TODO
TARGET_LINK_LIBRARIES(gmpc-glyros ${GTK2_LIBRARIES})

# Im pretty sure there's a nice way..
ADD_CUSTOM_COMMAND (
TARGET gmpc-glyros
POST_BUILD
Expand Down

0 comments on commit a66802f

Please sign in to comment.