Skip to content

Commit

Permalink
Check for Release subfolder for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
geographika committed Sep 4, 2018
1 parent 8bef6c9 commit 4739211
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions mapscript/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ file(GENERATE OUTPUT $<TARGET_FILE_DIR:${SWIG_MODULE_pythonmapscript_REAL_NAME}>
set(BUILD_TIMESTAMP "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp")
set(TESTS_FOLDER ${PROJECT_SOURCE_DIR}/mapscript/python/tests/cases)

if( "${CMAKE_BUILD_TYPE}" STREQUAL "")
if(MSVC)
set(OUTPUT_FOLDER ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR})
else()$<TARGET_FILE_DIR:tgt>
# for non-Windows builds there are no build type subfolders (e.g. Release, Debug etc.)
set(OUTPUT_FOLDER ${CMAKE_CURRENT_BINARY_DIR})
else()
set(OUTPUT_FOLDER ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
endif()

set(OUTPUT_FOLDER $<TARGET_FILE_DIR:${SWIG_MODULE_pythonmapscript_REAL_NAME}>)

if(WIN32)
set(PYTHON_SCRIPTS ${PYTHON_PREFIX}/Scripts)
set(PYTHON_VENV_SCRIPTS ${OUTPUT_FOLDER}/mapscriptvenv/Scripts)
else()
set(PYTHON_SCRIPTS ${PYTHON_PREFIX}/bin)
set(PYTHON_VENV_SCRIPTS ${OUTPUT_FOLDER}/mapscriptvenv/bin)
endif()

Expand Down Expand Up @@ -127,4 +127,3 @@ message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
message(STATUS "Python MapScript output directory: ${OUTPUT_FOLDER}")
message(STATUS "Python executable: ${PYTHON_EXECUTABLE}")
message(STATUS "Python site packages: ${PYTHON_SITE_PACKAGES}")
message(STATUS "Virtual env: ${ACTIVATE_VENV}")

0 comments on commit 4739211

Please sign in to comment.