1: # CMake Grundsätzliches --------------------------------------
2: CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
3: IF (POLICY CMP0048)
4: CMAKE_POLICY(SET CMP0048 NEW) # Wg. VERSION im project Befehl
5: ENDIF (POLICY CMP0048)
6:
7: PROJECT(components_simple VERSION 1.2.3)
8:
9: ADD_LIBRARY(mylib mylib.c)
10:
11: ADD_EXECUTABLE(myapp myapp.c mylib.h)
12: TARGET_LINK_LIBRARIES(myapp mylib)
13:
14: INSTALL(TARGETS mylib ARCHIVE DESTINATION lib COMPONENT libraries)
15: INSTALL(TARGETS myapp RUNTIME DESTINATION bin COMPONENT applications)
16: INSTALL(FILES mylib.h DESTINATION include COMPONENT libraries)
17: INSTALL(FILES licence.txt DESTINATION doc)
18:
19: # Standard --------------------------------------------------------
20: SET(CPACK_WIX_UPGRADE_GUID AD242896-B620-410A-A3C3-0BCD856A53C2)
21: # Sprache
22: SET(CPACK_WIX_CULTURES "de-DE")
23: # WIX Generator
24: SET(CPACK_GENERATOR WIX)
25: # Standard Ende ---------------------------------------------------
26:
27:
28: # Zur Auswahl der Komponenten
29: INCLUDE(CPackComponent)
30:
31: cpack_add_component(libraries DISPLAY_NAME "Bibliothek" DESCRIPTION "Die Bibliothek")
32: cpack_add_component(applications DISPLAY_NAME "Applikation" DESCRIPTION "Nur die Applikation")
33:
34: INCLUDE(CPack)