File tree Expand file tree Collapse file tree
UnigineEditorPlugin_Python3Scripting Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ $ sudo apt install qt5-default cmake gcc git-core
1919Windows:
2020- install cmake >= 3.20
2121- install visual studio
22- - install qt 5.12.x
22+ - install qt 5.12.x (And set system environment variable ` QTDIR=C:\Qt\Qt5.12.3\5.12.3\ ` )
2323- install python3 (for command scripts)
2424
2525### step 1: create a empty project
Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ file (STRINGS "../version" PYTHON3SCRIPTING_VERSION)
1111add_definitions (-DPYTHON3SCRIPTING_VERSION= "${PYTHON3SCRIPTING_VERSION} " )
1212add_subdirectory (QCodeEditor )
1313
14-
15-
1614include (${PROJECT_SOURCE_DIR} /cmake/Unigine.cmake )
1715
1816if (EXISTS ${PROJECT_SOURCE_DIR} /${proj_name} .json.in )
@@ -34,7 +32,13 @@ set(CMAKE_AUTOMOC ON)
3432# Create code from resource files
3533set (CMAKE_AUTORCC ON )
3634
37- find_package (Qt5 COMPONENTS Core Widgets Gui REQUIRED )
35+ IF (WIN32 )
36+ # windows
37+ find_package (Qt5 HINTS "$ENV{QTDIR} " COMPONENTS Core Widgets Gui REQUIRED )
38+ ELSE ()
39+ # linux
40+ find_package (Qt5 COMPONENTS Core Widgets Gui REQUIRED )
41+ ENDIF ()
3842
3943set (RESOURCES_FILE
4044 resources/UnigineEditorPlugin_Python3Scripting_resources.qrc
Original file line number Diff line number Diff line change @@ -77,9 +77,18 @@ set(CMAKE_AUTOMOC On)
7777set (CMAKE_AUTORCC ON )
7878
7979# Find includes in corresponding build directories
80- find_package (Qt5Core CONFIG REQUIRED )
81- find_package (Qt5Widgets CONFIG REQUIRED )
82- find_package (Qt5Gui CONFIG REQUIRED )
80+ IF (WIN32 )
81+ # windows
82+ find_package (Qt5Core HINTS "$ENV{QTDIR} " CONFIG REQUIRED )
83+ find_package (Qt5Widgets HINTS "$ENV{QTDIR} " CONFIG REQUIRED )
84+ find_package (Qt5Gui HINTS "$ENV{QTDIR} " CONFIG REQUIRED )
85+ ELSE ()
86+ # linux
87+ find_package (Qt5Core CONFIG REQUIRED )
88+ find_package (Qt5Widgets CONFIG REQUIRED )
89+ find_package (Qt5Gui CONFIG REQUIRED )
90+ ENDIF ()
91+
8392
8493add_library (${proj_name} STATIC
8594 ${RESOURCES_FILE}
Original file line number Diff line number Diff line change 2323build_commands = [
2424 {
2525 "name" : "cmake configure release" ,
26- "command" : "cmake -H. -Bjunk/release -DCMAKE_BUILD_TYPE=Release \
26+ "command" : "cmake -H. -Bjunk/release_" + _platform + " -DCMAKE_BUILD_TYPE=Release \
2727 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
2828 -DCMAKE_INSTALL_PREFIX=../bin" ,
2929 },
3030 {
3131 "name" : "cmake build release" ,
32- "command" : "cmake --build junk/release --parallel 8 --config Release" ,
32+ "command" : "cmake --build junk/release_" + _platform + " --parallel 8 --config Release" ,
3333 },
3434 {
3535 "name" : "cmake configure debug" ,
36- "command" : "cmake -H. -Bjunk/debug -DCMAKE_BUILD_TYPE=Debug \
36+ "command" : "cmake -H. -Bjunk/debug_" + _platform + " -DCMAKE_BUILD_TYPE=Debug \
3737 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
3838 -DCMAKE_INSTALL_PREFIX=../bin" ,
3939 },
4040 {
4141 "name" : "cmake build debug" ,
42- "command" : "cmake --build junk/debug --parallel 8 --config Debug" ,
42+ "command" : "cmake --build junk/debug_" + _platform + " --parallel 8 --config Debug" ,
4343 },
4444]
4545
You can’t perform that action at this time.
0 commit comments