File: CMakeLists.txt

package info (click to toggle)
museek%2B 1%3A0.2%2Bsvn20100315.r1208-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 7,628 kB
  • sloc: cpp: 28,853; python: 28,014; ansic: 538; makefile: 122; sh: 117
file content (58 lines) | stat: -rw-r--r-- 1,247 bytes parent folder | download | duplicates (3)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
project(Mucous)


IF(PREFIX)
  SET(CMAKE_INSTALL_PREFIX ${PREFIX})
ELSE(PREFIX)
  SET(CMAKE_INSTALL_PREFIX "/usr")
ENDIF(PREFIX)


if (NOT MANDIR)
  set(MANUAL_DIRECTORY "man/man1")
else (NOT MANDIR)
  set(MANUAL_DIRECTORY ${MANDIR}/man1)
endif (NOT MANDIR)

# add_subdirectory(pymucous)
set(MUCOUS_SOURCES
  mucous
)


project(Pymucous)

file(GLOB_RECURSE PYMUCOUS_FILES pymucous/*.py)

set(PYMUCOUS_SOURCES
  ${PYMUCOUS_FILES}
)

EXECUTE_PROCESS(COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1,0,'')" museek OUTPUT_VARIABLE sitepackages OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_VARIABLE error)

if (NOT sitepackages OR error)
	MESSAGE(FATAL_ERROR "Failed to find Python's site-packages directory" ${sitepackages} ${error})
endif (NOT sitepackages OR error)

install(
  FILES ${PYMUCOUS_SOURCES}
  DESTINATION ${CMAKE_INSTALL_PREFIX}/${sitepackages}/pymucous
)


# Install the muscan binary to the 'bin' directory.
install(
  FILES ${MUCOUS_SOURCES}
  DESTINATION bin
  PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)

set(MANPAGES
  mucous.1
)

install(
  FILES ${MANPAGES}
  DESTINATION ${MANUAL_DIRECTORY}
)
MESSAGE("--> Mucous will be installed..")