Skip to content

Commit 26a2e86

Browse files
Added new methods
1 parent 9416e90 commit 26a2e86

16 files changed

+1255
-197
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ endif()
3131
################################################################################
3232
SET(${PARENT}_LENS ON CACHE BOOL "" ${REWRITE_FORCE})
3333
SET(${PARENT}_LENS_TEST ON CACHE BOOL "" ${REWRITE_FORCE})
34+
SET(${PARENT}_LENS_EXAMPLE ON CACHE BOOL "" ${REWRITE_FORCE})
3435

3536

3637

@@ -46,3 +47,7 @@ endif()
4647
if (${PARENT}_LENS_TEST)
4748
add_subdirectory(test)
4849
endif()
50+
51+
if (${PARENT}_LENS_EXAMPLE)
52+
add_subdirectory(example)
53+
endif()
264 KB
Binary file not shown.

README.md

Lines changed: 201 additions & 163 deletions
Large diffs are not rendered by default.

README.pdf

-253 KB
Binary file not shown.

_static/lens_logo.png

-26.2 KB
Binary file not shown.

_static/lens_web_logo.png

28.8 KB
Loading

example/CMakeLists.txt

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
cmake_minimum_required(VERSION 3.13)
2+
3+
4+
5+
###############################################################################
6+
## INTERFACE-PROJECT
7+
## name and version
8+
###############################################################################
9+
project(CustomLens VERSION 1.0.0 LANGUAGES CXX)
10+
11+
12+
13+
###############################################################################
14+
## SETTINGS
15+
## basic project settings before use
16+
###############################################################################
17+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
18+
set(CMAKE_CXX_STANDARD 17)
19+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
20+
# Enabling export of all symbols to create a dynamic library
21+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
22+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
23+
# creating output directory architecture in accordance with GNU guidelines
24+
set(BINARY_DIR "${CMAKE_BINARY_DIR}")
25+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BINARY_DIR}/bin")
26+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${BINARY_DIR}/lib")
27+
file (GLOB_RECURSE IN_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.h.in)
28+
configure_file(${IN_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Version.h)
29+
30+
31+
32+
###############################################################################
33+
## TARGET
34+
## create target and add include path
35+
###############################################################################
36+
# create glob files for *.h, *.cpp
37+
file (GLOB_RECURSE H_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
38+
file (GLOB_RECURSE CPP_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
39+
# concatenate the results (glob files) to variable
40+
set (SOURCES ${CPP_FILES} ${H_FILES})
41+
# create lib from src
42+
if (NOT TARGET ${PROJECT_NAME})
43+
add_library(${PROJECT_NAME} STATIC ${SOURCES})
44+
endif()
45+
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
46+
47+
48+
49+
###############################################################################
50+
## LINK LIBRARIES
51+
## linking all dependencies
52+
###############################################################################
53+
target_link_libraries(${PROJECT_NAME} Lens)

0 commit comments

Comments
 (0)