forked from yasm/yasm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (34 loc) · 1.16 KB
/
CMakeLists.txt
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
PROJECT(yasm)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
if (COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif (COMMAND cmake_policy)
OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON)
# Where to look first for cmake modules
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
INCLUDE(YasmMacros)
INCLUDE(VersionGen)
OPTION(ENABLE_NLS "Enable message translations" OFF)
OPTION(YASM_BUILD_TESTS "Enable building of tests" ON)
IF(YASM_BUILD_TESTS)
ENABLE_TESTING()
ENDIF(YASM_BUILD_TESTS)
# Default build type to debug if not set
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Debug CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)
VERSION_GEN(PACKAGE_VERSION "${CMAKE_BINARY_DIR}/YASM-VERSION-FILE" "1.3.0")
set (PACKAGE_STRING "yasm ${PACKAGE_VERSION}")
INCLUDE_DIRECTORIES(AFTER ${CMAKE_BINARY_DIR} ${yasm_SOURCE_DIR})
INCLUDE(ConfigureChecks.cmake)
ADD_SUBDIRECTORY(tools)
ADD_SUBDIRECTORY(libyasm)
ADD_SUBDIRECTORY(modules)
ADD_SUBDIRECTORY(frontends)
INSTALL(FILES
libyasm.h
${CMAKE_BINARY_DIR}/libyasm-stdint.h
DESTINATION include
)