forked from ring-lang/ring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
39 lines (28 loc) · 930 Bytes
/
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
# Description : Build Ring using CMake
# Author : Mahmoud Fayed <[email protected]>
cmake_minimum_required (VERSION 2.6)
project (ring)
# Header Files
include_directories(include)
# Add source files
file(GLOB SOURCES "src/*.c")
list(REMOVE_ITEM SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/ring.c)
list(REMOVE_ITEM SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/ringw.c)
# Check the Operating System
IF (WIN32)
message("Building Ring for Windows")
add_library(ring SHARED ${SOURCES})
target_link_libraries (ring)
ELSE(WIN32)
IF(NOT APPLE)
message("Building Ring for Linux")
ELSE(NOT APPLE)
message("Building Ring For MacOS X")
ENDIF(NOT APPLE)
add_library(ring SHARED ${SOURCES})
target_link_libraries (ring m dl)
ENDIF(WIN32)
# Create Executable
ADD_EXECUTABLE (ringlang ${CMAKE_CURRENT_SOURCE_DIR}/src/ring.c)
TARGET_LINK_LIBRARIES (ringlang ring)
set_target_properties(ringlang PROPERTIES OUTPUT_NAME ring)