File: CMakeLists.txt

package info (click to toggle)
emscripten 3.1.69%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 121,872 kB
  • sloc: ansic: 636,110; cpp: 425,974; javascript: 78,401; python: 58,404; sh: 49,154; pascal: 5,237; makefile: 3,365; asm: 2,415; lisp: 1,869
file content (19 lines) | stat: -rw-r--r-- 799 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
cmake_minimum_required(VERSION 3.0)

project(static_library)

# Test mode that checks that it's possible to override the file suffix
# (independent of whether ar archive or LLVM bitcode file is created)
# Note that "-DCMAKE_STATIC_LIBRARY_SUFFIX=foo" cannot be passed to CMake from
# command line to override the suffix, but changing it needs
# to happen in the CMakeLists.txt file itself. (this is likely due to CMake
# internal script evaluation order(?))
if (SET_CUSTOM_SUFFIX_IN_PROJECT)
  set(CMAKE_STATIC_LIBRARY_SUFFIX ".somecustomsuffix")

  # Also check that we can control the prefix. Setting this to an empty string
  # can be useful to get rid of the "lib" prefix that gets added by default.
  set(CMAKE_STATIC_LIBRARY_PREFIX "myprefix_")
endif()

add_library(static_lib STATIC lib.cpp)