do not hardcode CMAKE_INSTALL_PREFIX for windows, but rather put it in the script, so that custom build setups still work
authorkoda
Sat, 16 Mar 2013 23:29:50 +0100
changeset 8734 ecb0a97100cf
parent 8733 b6002f1956d5
child 8735 42892d1fb9e1
do not hardcode CMAKE_INSTALL_PREFIX for windows, but rather put it in the script, so that custom build setups still work
CMakeLists.txt
tools/build_windows.bat
--- a/CMakeLists.txt	Sun Mar 17 00:18:38 2013 +0400
+++ b/CMakeLists.txt	Sat Mar 16 23:29:50 2013 +0100
@@ -118,7 +118,6 @@
         set(target_library_install_dir "./")
         set(HEDGEWARS_DATADIR "./")
         set(HEDGEWARS_FULL_DATADIR "${CMAKE_INSTALL_PREFIX}/")
-        set(CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/misc/winutils/")
         link_directories("${EXECUTABLE_OUTPUT_PATH}" "${CMAKE_SOURCE_DIR}/misc/winutils/bin")
     endif()
 endif()
--- a/tools/build_windows.bat	Sun Mar 17 00:18:38 2013 +0400
+++ b/tools/build_windows.bat	Sat Mar 16 23:29:50 2013 +0100
@@ -39,7 +39,7 @@
 
 echo Running cmake...
 set ERRORLEVEL=
-cmake -G "MinGW Makefiles" -DPNG_LIBRARY="%CD%\misc\winutils\bin\libpng13.dll" . -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
+cmake . -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH="%CD%\misc\winutils\" -DPNG_LIBRARY="%CD%\misc\winutils\bin\libpng13.dll" -DCMAKE_BUILD_TYPE="%BUILD_TYPE%"
 
 if %ERRORLEVEL% NEQ 0 goto exitpoint