Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Files for compil Simgrid with cmake and make a distrib with cpack.
[simgrid.git] / buildtools / CPACK / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 #--------------------------------------------------------------------------------------------------
4 ### need to set TODO make it by arguments
5 SET(disable_java 0)
6 SET(disable_gtnets 0)
7 SET(gtnets_path "")
8 SET(disable_context_threads 1)
9
10 ### Set some variables for Cmake
11 SET(PROJECT_NAME "Simgrid_cmake")
12 SET(LANGUAGE "Cxx")
13 SET(PROJECT_DIRECTORY "/home/navarrop/Bureau/simgrid-trunk")
14 SET(PROJECT_SOURCE_DIRECTORY "${PROJECT_DIRECTORY}/src")
15 set(EXECUTABLE_OUTPUT_PATH "${PROJECT_DIRECTORY}/bin")
16 set(LIBRARY_OUTPUT_PATH "${PROJECT_DIRECTORY}/lib")
17 set(INCLUDES "-I${PROJECT_DIRECTORY}/include -I${PROJECT_DIRECTORY}/src/include -I${PROJECT_DIRECTORY}/src")
18
19 ### Make the *.h files with *.h.in files
20 include(${PROJECT_DIRECTORY}/src/CMakeCompleteInFiles.txt OPTIONAL NO_POLICY_SCOPE)
21
22 ### Define source packages for Libs 
23 include(${PROJECT_DIRECTORY}/src/CMakeDefinePackages.txt OPTIONAL NO_POLICY_SCOPE)
24
25 ### Make Libs
26 add_definitions("${INCLUDES}")
27
28 add_library(simgrid SHARED ${simgrid_sources})
29 add_library(gras SHARED ${gras_sources})
30
31 ### Make the distrib
32 install(TARGETS simgrid DESTINATION "simgrid/lib/")
33 install(TARGETS gras    DESTINATION "simgrid/lib/")
34 install(FILES ${simgrid_sources} DESTINATION "simgrid/src/simgrid")
35 install(FILES ${gras_sources} DESTINATION "simgrid/src/gras")
36 install(FILES ${EXTRA_DIST} DESTINATION "simgrid/src/ExtraDist")
37 install(DIRECTORY "${PROJECT_DIRECTORY}/include/" 
38         DESTINATION "simgrid/include/"
39         )
40
41 set(CPACK_PROJECT_NAME "${PROJECT_NAME}")
42 set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}")
43 set(CPACK_GENERATOR "TGZ;TZ;ZIP")
44 include(CPack)
45
46