-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
30 lines (22 loc) · 944 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cmake_minimum_required(VERSION 2.8)
project(WPGenerator)
FILE(GLOB Sources *.c)
SET(CMAKE_MODULE_PATH "CMake")
IF(CMAKE_BUILD_TYPE STREQUAL "Release")
set(RESSOURCEDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
add_definitions("-O2 -std=c99 -march=native")
ELSE()
set(RESSOURCEDIR "${CMAKE_SOURCE_DIR}/res")
add_definitions("-O0 -std=c99 -march=native -g -Wall -Wextra -pedantic")
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release")
add_definitions("-D DATAROOTDIR=${RESSOURCEDIR}")
add_executable(${PROJECT_NAME} ${Sources})
find_package (RSVG)
if (RSVG_FOUND)
include_directories(${RSVG_INCLUDE_DIRS})
target_link_libraries (${PROJECT_NAME} ${RSVG_LIBRARIES})
include_directories(${CAIRO_INCLUDE_DIRS})
target_link_libraries (${PROJECT_NAME} ${CAIRO_LIBRARIES})
endif (RSVG_FOUND)
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
install(FILES "res/archlinux-logo-light-scalable.svg" DESTINATION "share/${PROJECT_NAME}")