-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
40 lines (33 loc) · 1.22 KB
/
CMakeLists.txt
File metadata and controls
40 lines (33 loc) · 1.22 KB
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
cmake_minimum_required(VERSION 2.8)
# Give a name to the project.
project(StrategyModule)
# You need this to find the qiBuild CMake framework
find_package(qibuild)
# Create an option to make is possible compiling the module
# as a remote executable, or as a local shared library
option(MYMODULE_IS_REMOTE
"module is compiled as a remote module (ON or OFF)"
OFF)
# Create a list of source files
set(_srcs
src/main.cpp
src/Custom.cpp
src/StrategyModule.cpp)
if(MYMODULE_IS_REMOTE)
# Add a compile flag because code changes a little bit
# when we are compiling an executable
# This will let you use #ifdef HELLOWORLD_IS_REMOTE
# in the C++ code
add_definitions( " -DMYMODULE_IS_REMOTE ")
# Create an executable
qi_create_bin(StrategyModule ${_srcs})
else()
# Create a plugin, that is a shared library, and make
# sure it is built in lib/naoqi, so that the naoqi executable
# can find it later
qi_create_lib(StrategyModule SHARED ${_srcs} SUBFOLDER naoqi)
endif()
# Tell CMake that mymodule depends on ALCOMMON and ALPROXIES.
# This will set the libraries to link mymodule with,
# the src paths, and so on
qi_use_lib(StrategyModule ALCOMMON ALPROXIES BOOST)