File: ConfigureBuild.cmake

package info (click to toggle)
mygui 3.2.2+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 36,224 kB
  • sloc: cpp: 118,031; ansic: 30,202; xml: 15,544; cs: 12,602; tcl: 776; python: 417; makefile: 34
file content (58 lines) | stat: -rw-r--r-- 1,832 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
#######################################################################
# This file takes care of configuring MyGUI to build with the settings
# given in CMake. It creates the necessary config.h file and will 
# also prepare package files for pkg-config and CMake.
#######################################################################

# should we build static libs?
if (MYGUI_STATIC)
  set(MYGUI_LIB_TYPE STATIC)
else ()
  set(MYGUI_LIB_TYPE SHARED)
endif ()

set(MYGUI_STATIC_LIB 0)


if (MYGUI_STATIC)
  set(MYGUI_STATIC_LIB 1)
  add_definitions(-DMYGUI_STATIC)
endif()

if (WIN32)
	configure_file(${MYGUI_TEMPLATES_DIR}/updateListFiles.bat.in ${MYGUI_BINARY_DIR}/updateListFiles.bat)
endif ()

# Create the pkg-config package files on Unix systems
if (UNIX)
  set(MYGUI_LIB_SUFFIX "")
  set(MYGUI_PLUGIN_PREFIX "")
  set(MYGUI_PLUGIN_EXT ".so")
  if (MYGUI_STATIC)
    set(MYGUI_LIB_SUFFIX "${MYGUI_LIB_SUFFIX}Static")
    set(MYGUI_PLUGIN_PREFIX "lib")
    set(MYGUI_PLUGIN_EXT ".a")
  endif ()
  string(TOLOWER "${CMAKE_BUILD_TYPE}" MYGUI_BUILD_TYPE)
  if (MYGUI_BUILD_TYPE STREQUAL "debug")
    set(MYGUI_LIB_SUFFIX "${MYGUI_LIB_SUFFIX}_d")
  endif ()

  set(MYGUI_ADDITIONAL_LIBS "")
  set(MYGUI_CFLAGS "")
  set(MYGUI_PREFIX_PATH ${CMAKE_INSTALL_PREFIX})
  set(MYGUI_ADDITIONAL_LIBS "${MYGUI_ADDITIONAL_LIBS}")
  if (MYGUI_STATIC)
    configure_file(${MYGUI_TEMPLATES_DIR}/MYGUIStatic.pc.in ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc @ONLY)
  else ()
    configure_file(${MYGUI_TEMPLATES_DIR}/MYGUI.pc.in ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc @ONLY)
  endif ()
  install(FILES ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc DESTINATION lib/pkgconfig)

  # configure additional packages
  
endif ()

if (MYGUI_STANDALONE_BUILD)
  set(CMAKE_SUPPRESS_REGENERATION true)
endif()