-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
58 lines (48 loc) · 1.34 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
48
49
50
51
52
53
54
55
56
57
58
CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
SET (PROJET_NAME fxite)
SET (PROJET_VERSION 0.93)
PROJECT (${PROJET_NAME})
SET (CMAKE_VERBOSE_MAKEFILE ON)
ADD_DEFINITIONS (-DVERSION="${PROJET_VERSION}")
# Locate pkg-config
FIND_PACKAGE (PkgConfig REQUIRED)
# Locate FOX
IF (NOT FOX_MODULE)
SET (FOX_MODULE "fox18;fox17;fox")
ENDIF ()
PKG_SEARCH_MODULE (FOX REQUIRED ${FOX_MODULE})
LINK_DIRECTORIES(${FOX_LIBDIR})
STRING (REGEX MATCH "^[0-9]+.[0-9]+" FOX_VER ${FOX_VERSION})
IF (${FOX_VER} STREQUAL "1.6")
ADD_DEFINITIONS ("-DFOX_1_6")
ELSEIF (${FOX_VER} STREQUAL "1.7")
ADD_DEFINITIONS ("-DFOX_1_7")
ENDIF ()
# Locate reswrap
IF (NOT RESWRAP)
IF (NOT RESWRAP)
FIND_PROGRAM (
RESWRAP
NAMES reswrap-1.7 reswrap
PATHS /bin /usr/bin /usr/local/bin /opt/local/bin
)
ENDIF (NOT RESWRAP)
IF (NOT RESWRAP)
MESSAGE (FATAL_ERROR "Could not locate reswrap")
ENDIF ()
ENDIF ()
# Locate X11
FIND_PACKAGE (X11 REQUIRED)
# Locate LUA
OPTION (USE_SYSTEM_LUA "Use the installed Lua library" OFF)
IF (USE_SYSTEM_LUA)
FIND_PACKAGE (Lua51 REQUIRED)
ELSE ()
ADD_SUBDIRECTORY (${CMAKE_SOURCE_DIR}/lua)
SET (LUA_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/lua")
SET (LUA_LIBRARIES lua)
ENDIF ()
ADD_SUBDIRECTORY (fxscintilla)
ADD_SUBDIRECTORY (jef)
ADD_SUBDIRECTORY (mnumgr)
ADD_SUBDIRECTORY (src)