Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
djinni
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
djinni
Commits
8528ff90
Commit
8528ff90
authored
Apr 04, 2017
by
Bruno Coelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move CMakeLists.txt file to root directory and rename target name to djinni_support_lib
parent
568b08b0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
CMakeLists.txt
CMakeLists.txt
+72
-0
No files found.
support-lib/
CMakeLists.txt
→
CMakeLists.txt
View file @
8528ff90
cmake_minimum_required
(
VERSION 3.6.0
)
cmake_minimum_required
(
VERSION 3.6.0
)
project
(
Djinni
)
project
(
djinni_support_lib
)
include
(
GNUInstallDirs
)
include
(
GNUInstallDirs
)
set
(
SRC_SHARED
set
(
SRC_SHARED
"djinni_common.hpp"
"
support-lib/
djinni_common.hpp"
"proxy_cache_interface.hpp"
"
support-lib/
proxy_cache_interface.hpp"
"proxy_cache_impl.hpp"
"
support-lib/
proxy_cache_impl.hpp"
)
)
set
(
SRC_JNI
set
(
SRC_JNI
"jni/djinni_support.hpp"
"
support-lib/
jni/djinni_support.hpp"
"jni/Marshal.hpp"
"
support-lib/
jni/Marshal.hpp"
"jni/djinni_support.cpp"
"
support-lib/
jni/djinni_support.cpp"
)
)
set
(
SRC_OBJC
set
(
SRC_OBJC
"objc/DJICppWrapperCache+Private.h"
"
support-lib/
objc/DJICppWrapperCache+Private.h"
"objc/DJIError.h"
"
support-lib/
objc/DJIError.h"
"objc/DJIMarshal+Private.h"
"
support-lib/
objc/DJIMarshal+Private.h"
"objc/DJIObjcWrapperCache+Private.h"
"
support-lib/
objc/DJIObjcWrapperCache+Private.h"
"objc/DJIError.mm"
"
support-lib/
objc/DJIError.mm"
"objc/DJIProxyCaches.mm"
"
support-lib/
objc/DJIProxyCaches.mm"
)
)
option
(
DJINNI_STATIC_LIB
"Build Djinni as a static library instead of dynamic (the default)."
off
)
option
(
DJINNI_STATIC_LIB
"Build Djinni
support library
as a static library instead of dynamic (the default)."
off
)
if
(
DJINNI_STATIC_LIB
)
if
(
DJINNI_STATIC_LIB
)
add_library
(
djinni STATIC
${
SRC_SHARED
}
)
add_library
(
djinni
_support_lib
STATIC
${
SRC_SHARED
}
)
else
()
else
()
add_library
(
djinni SHARED
${
SRC_SHARED
}
)
add_library
(
djinni
_support_lib
SHARED
${
SRC_SHARED
}
)
endif
()
endif
()
source_group
(
""
FILES
${
SRC_SHARED
}
)
source_group
(
""
FILES
${
SRC_SHARED
}
)
set_target_properties
(
djinni PROPERTIES
set_target_properties
(
djinni
_support_lib
PROPERTIES
CXX_STANDARD 11
CXX_STANDARD 11
CXX_STANDARD_REQUIRED true
CXX_STANDARD_REQUIRED true
CXX_EXTENSIONS false
CXX_EXTENSIONS false
)
)
# Objective-C support
# Objective-C support
option
(
DJINNI_WITH_OBJC
"Include the Objective-C support code in Djinni."
off
)
option
(
DJINNI_WITH_OBJC
"Include the Objective-C support code in Djinni
support library
."
off
)
if
(
DJINNI_WITH_OBJC
)
if
(
DJINNI_WITH_OBJC
)
target_include_directories
(
djinni
PUBLIC
"$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/objc/>"
)
target_include_directories
(
djinni
_support_lib PUBLIC
"$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/support-lib
/objc/>"
)
target_sources
(
djinni PRIVATE
${
SRC_OBJC
}
)
target_sources
(
djinni
_support_lib
PRIVATE
${
SRC_OBJC
}
)
source_group
(
"objc"
FILES
${
SRC_OBJC
}
)
source_group
(
"objc"
FILES
${
SRC_OBJC
}
)
target_compile_options
(
djinni PUBLIC
"-fobjc-arc"
)
target_compile_options
(
djinni
_support_lib
PUBLIC
"-fobjc-arc"
)
endif
()
endif
()
# JNI support
# JNI support
option
(
DJINNI_WITH_JNI
"Include the JNI support code in Djinni."
off
)
option
(
DJINNI_WITH_JNI
"Include the JNI support code in Djinni
support library
."
off
)
if
(
DJINNI_WITH_JNI
)
if
(
DJINNI_WITH_JNI
)
if
(
NOT DJINNI_STATIC_LIB
)
if
(
NOT DJINNI_STATIC_LIB
)
list
(
APPEND SRC_JNI
"jni/djinni_main.cpp"
)
list
(
APPEND SRC_JNI
"
support-lib/
jni/djinni_main.cpp"
)
endif
()
endif
()
target_include_directories
(
djinni
PUBLIC
"$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/jni/>"
)
target_include_directories
(
djinni
_support_lib PUBLIC
"$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/support-lib
/jni/>"
)
target_sources
(
djinni PRIVATE
${
SRC_JNI
}
)
target_sources
(
djinni
_support_lib
PRIVATE
${
SRC_JNI
}
)
source_group
(
"jni"
FILES
${
SRC_JNI
}
)
source_group
(
"jni"
FILES
${
SRC_JNI
}
)
# Do not use the host's jni.h on Android as it is provided automatically by the NDK
# Do not use the host's jni.h on Android as it is provided automatically by the NDK
if
(
NOT ANDROID
)
if
(
NOT ANDROID
)
find_package
(
JNI REQUIRED QUIET
)
find_package
(
JNI REQUIRED QUIET
)
target_include_directories
(
djinni PUBLIC
"
${
JNI_INCLUDE_DIRS
}
"
)
target_include_directories
(
djinni
_support_lib
PUBLIC
"
${
JNI_INCLUDE_DIRS
}
"
)
endif
()
endif
()
endif
()
endif
()
target_compile_options
(
djinni PRIVATE
"-fexceptions"
"-frtti"
)
if
(
NOT
(
DJINNI_WITH_OBJC OR DJINNI_WITH_JNI
))
if
(
NOT
(
DJINNI_WITH_OBJC OR DJINNI_WITH_JNI
))
message
(
FATAL_ERROR
"At least one of DJINNI_WITH_OBJC or DJINNI_WITH_JNI must be enabled."
)
message
(
FATAL_ERROR
"At least one of DJINNI_WITH_OBJC or DJINNI_WITH_JNI must be enabled."
)
endif
()
endif
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment