File: unix-toolchain.cmake

package info (click to toggle)
isospec 2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,476 kB
  • sloc: cpp: 9,530; python: 2,095; makefile: 180; ansic: 100; sh: 88
file content (42 lines) | stat: -rw-r--r-- 1,410 bytes parent folder | download | duplicates (4)
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
message("")
message("${BoldRed}UNIX non APPLE environment${ColourReset}")
message("")
message("~~~~~~ Instructions ~~~~~~")
message("On UNIX/GNU-Linux, please run the configuration like this:")
message("cmake -G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=<Debug | Release> -DCMAKE_INSTALL_PREFIX=</usr | your_dir> ../development")
message("")

set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES /usr/include)
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES /usr/include)

## platform dependent compiler flags:
include(CheckCXXCompilerFlag)

if(WITH_FPIC)
	add_definitions(-fPIC)
endif()

# Install cmake module
install(FILES ${CMAKE_MODULE_PATH}/FindIsoSpec++.cmake 
	DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/isospec++)

# Install cmake config
configure_file(${CMAKE_MODULE_PATH}/IsoSpec++Config.cmake.in
	${CMAKE_BINARY_DIR}/IsoSpec++Config.cmake)
install(FILES ${CMAKE_BINARY_DIR}/IsoSpec++Config.cmake 
	DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/isospec++)

# Install the PkgConfig config file (only substitute the @VAR@
# because we need to preserve all the ${prefix} strings like
# they are.
configure_file(${CMAKE_MODULE_PATH}/pkgconfig/libisospec++.pc.in
	${CMAKE_BINARY_DIR}/libisospec++.pc @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/libisospec++.pc 
	DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

# Now deal with the manual doc stuff
add_subdirectory(man)

# Now deal with the example  stuff
add_subdirectory(Examples)