Skip to content

Commit 735ac9b

Browse files
committed
add cmake submod and fix minor things
1 parent 5d776b2 commit 735ac9b

File tree

4 files changed

+20
-156
lines changed

4 files changed

+20
-156
lines changed

.gitmodules

+4
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@
99
path = external/v_repPlusPlus
1010
url = https://github.com/CoppeliaRobotics/v_repPlusPlus
1111
branch = master
12+
[submodule "cmake/CoppeliaRobotics-modules"]
13+
path = cmake/CoppeliaRobotics-modules
14+
url = https://github.com/CoppeliaRobotics/cmake.git
15+
branch = master

CMakeLists.txt

+15-12
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,24 @@ find_package(Qt53DRender REQUIRED)
1717
find_package(Qt53DInput REQUIRED)
1818
find_package(Qt53DExtras REQUIRED)
1919

20-
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
20+
set(CMAKE_MODULE_PATH
21+
${CMAKE_MODULE_PATH}
22+
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
23+
${CMAKE_CURRENT_SOURCE_DIR}/cmake/CoppeliaRobotics-modules)
2124
find_package(VREP 3.5.0 REQUIRED)
2225

2326
include_directories(${VREP_INCLUDE})
24-
include_directories(${CMAKE_BINARY_DIR}/generated)
25-
include_directories(${CMAKE_SOURCE_DIR}/external)
26-
include_directories(${CMAKE_SOURCE_DIR}/external/QDataflowCanvas)
27-
include_directories(${CMAKE_SOURCE_DIR}/external/QCustomPlot-2.0.0)
27+
include_directories(${CMAKE_CURRENT_BINARY_DIR}/generated)
28+
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external)
29+
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/QDataflowCanvas)
30+
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/QCustomPlot-2.0.0)
2831
include_directories(${Boost_INCLUDE_DIRS})
2932

30-
vrep_generate_stubs(${CMAKE_BINARY_DIR}/generated XML_FILE ${CMAKE_SOURCE_DIR}/callbacks.xml LUA_FILE ${CMAKE_SOURCE_DIR}/simExtCustomUI.lua)
33+
vrep_generate_stubs(${CMAKE_CURRENT_BINARY_DIR}/generated XML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/callbacks.xml LUA_FILE ${CMAKE_CURRENT_SOURCE_DIR}/simExtCustomUI.lua)
3134

32-
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/generated/widgets.html
33-
COMMAND xsltproc -o ${CMAKE_BINARY_DIR}/generated/widgets.html ${CMAKE_SOURCE_DIR}/widgets.xsl ${CMAKE_SOURCE_DIR}/widgets.xml
34-
DEPENDS ${CMAKE_SOURCE_DIR}/widgets.xml ${CMAKE_SOURCE_DIR}/widgets.xsl)
35+
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated/widgets.html
36+
COMMAND xsltproc -o ${CMAKE_CURRENT_BINARY_DIR}/generated/widgets.html ${CMAKE_CURRENT_SOURCE_DIR}/widgets.xsl ${CMAKE_CURRENT_SOURCE_DIR}/widgets.xml
37+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/widgets.xml ${CMAKE_CURRENT_SOURCE_DIR}/widgets.xsl)
3538

3639
set(ENABLE_SIGNAL_SPY false CACHE BOOL "if Qt private headers are installed, enable this to debug Qt signals")
3740
set(WIDGET_BUTTON true CACHE BOOL "include the button widget")
@@ -58,7 +61,7 @@ set(WIDGET_TEXTBROWSER true CACHE BOOL "include the textbrowser widget")
5861
set(WIDGET_TREE true CACHE BOOL "include the tree widget")
5962
set(WIDGET_VSLIDER true CACHE BOOL "include the vslider widget")
6063

61-
configure_file(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_BINARY_DIR}/config.h)
64+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
6265

6366
set(SOURCES
6467
Proxy.cpp
@@ -73,8 +76,8 @@ set(SOURCES
7376
widgets/LayoutWidget.cpp
7477
widgets/Widget.cpp
7578
widgets/Window.cpp
76-
${CMAKE_SOURCE_DIR}/external/v_repPlusPlus/Plugin.cpp
77-
${CMAKE_BINARY_DIR}/generated/stubs.cpp
79+
${CMAKE_CURRENT_SOURCE_DIR}/external/v_repPlusPlus/Plugin.cpp
80+
${CMAKE_CURRENT_BINARY_DIR}/generated/stubs.cpp
7881
${VREP_EXPORTED_SOURCES}
7982
)
8083

cmake/CoppeliaRobotics-modules

cmake/modules/FindVREP.cmake

-144
This file was deleted.

0 commit comments

Comments
 (0)