forked from innovait-rus/NativeAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (30 loc) · 976 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
# Cmake script for project AddInNative
# autor: 1C
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
PROJECT(innNative)
SET(innNative_SRC
innNative.cpp
innNative.h
dllmain.cpp
stdafx.cpp
stdafx.h
)
include_directories(${CMAKE_SOURCE_DIR}/include)
SET (CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${CMAKE_SOURCE_DIR})
if (UNIX)
set_source_files_properties(${innNative_SRC}
PROPERTIES COMPILE_FLAGS
"-fPIC")
else()
SET(innDef_SRC innNative.def)
SET(CMAKE_LINK_DEF_FILE_FLAG innNative.def)
add_definitions(-DUNICODE -DWIN32 )
endif()
add_library(${PROJECT_NAME} SHARED ${innNative_SRC} ${innDef_SRC})
set_target_properties( ${PROJECT_NAME} PROPERTIES
CLEAN_DIRECT_OUTPUT 1
#COMPILE_FLAGS "-m32" LINK_FLAGS "-m32"
# avoid conflicts between library and binary target names
OUTPUT_NAME ${PROJECT_NAME}${MySuffix1}${MySuffix2}
#WINDOWS_EXPORT_ALL_SYMBOLS TRUE
)