aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2018-08-08 11:11:22 +0200
committerMichael Buesch <m@bues.ch>2018-08-08 11:33:25 +0200
commit65f9cdb8b243eff54ca48ebd7f37e822264905dc (patch)
tree6c552aa4eea4c9002b6509d4d963895f7eb383f9
parentc4cef835e63abf6b6d6abd5904587b6f65fa8bbd (diff)
downloadrazer-65f9cdb8b243eff54ca48ebd7f37e822264905dc.zip
razer-65f9cdb8b243eff54ca48ebd7f37e822264905dc.tar.xz
ui: Move generated files to CMAKE_CURRENT_BINARY_DIR
Signed-off-by: Michael Buesch <m@bues.ch>
-rw-r--r--ui/.gitignore2
-rw-r--r--ui/CMakeLists.txt22
2 files changed, 11 insertions, 13 deletions
diff --git a/ui/.gitignore b/ui/.gitignore
deleted file mode 100644
index 7b4efd4..0000000
--- a/ui/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-build/
-setup.py
diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt
index ed785a5..e59cb8b 100644
--- a/ui/CMakeLists.txt
+++ b/ui/CMakeLists.txt
@@ -2,15 +2,16 @@ include("${razer_SOURCE_DIR}/scripts/cmake.global")
set(PYRAZER_DEPS "${CMAKE_CURRENT_SOURCE_DIR}/pyrazer/__init__.py"
- "${CMAKE_CURRENT_SOURCE_DIR}/pyrazer/main.py")
+ "${CMAKE_CURRENT_SOURCE_DIR}/pyrazer/main.py"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pyrazer/ui.py")
-set(PYRAZER_BUILD "${CMAKE_CURRENT_SOURCE_DIR}/build")
+set(PYRAZER_BUILD "${CMAKE_CURRENT_BINARY_DIR}/build")
-configure_file("setup.py.in" "${CMAKE_BINARY_DIR}/setup.py")
+configure_file(setup.py.in setup.py)
add_custom_command(OUTPUT ${PYRAZER_BUILD}/stamp
- COMMAND ${PYTHON} "${CMAKE_CURRENT_SOURCE_DIR}/setup.py" build -b "${PYRAZER_BUILD}"
+ COMMAND ${PYTHON} "${CMAKE_CURRENT_BINARY_DIR}/setup.py" build --build-base "${PYRAZER_BUILD}"
COMMAND ${CMAKE_COMMAND} -E touch ${PYRAZER_BUILD}/stamp
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${PYRAZER_DEPS})
@@ -23,10 +24,10 @@ install(CODE
if (\"\${PYDESTDIR}\" STREQUAL \"\")
set(PYDESTDIR /)
endif()
- execute_process(COMMAND ${PYTHON} \"${CMAKE_BINARY_DIR}/setup.py\"
- install --root \"\${PYDESTDIR}\" --prefix \"${CMAKE_INSTALL_PREFIX}\"
- WORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\"
- RESULT_VARIABLE pyrazer_install_res)
+ execute_process(COMMAND ${PYTHON} \"${CMAKE_CURRENT_BINARY_DIR}/setup.py\"
+ build --build-base \"${PYRAZER_BUILD}\" install --root \"\${PYDESTDIR}\" --prefix \"${CMAKE_INSTALL_PREFIX}\"
+ WORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\"
+ RESULT_VARIABLE pyrazer_install_res)
if (NOT \"\${pyrazer_install_res}\" STREQUAL \"0\")
message(FATAL_ERROR \"Failed to install pyrazer\")
endif()
@@ -35,10 +36,9 @@ install(CODE
install(PROGRAMS razer-gamewrapper
DESTINATION bin)
-configure_file("razercfg.desktop.template"
- "${CMAKE_BINARY_DIR}/razercfg.desktop")
+configure_file(razercfg.desktop.template razercfg.desktop)
-install(FILES ${CMAKE_BINARY_DIR}/razercfg.desktop
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/razercfg.desktop
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/
PERMISSIONS OWNER_READ OWNER_WRITE
GROUP_READ
bues.ch cgit interface