Skip to content

Commit db2fc68

Browse files
echoixrkanavath
andcommitted
fix ctypesgen
Co-authored-by: Rashad Kanavath <[email protected]>
1 parent 335f987 commit db2fc68

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

cmake/ctypesgen.cmake

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
# This program is free software under the GPL (>=v2)
55
# Read the file COPYING that comes with GRASS for details.
66

7-
set(ENV{GISRC}
8-
"${BIN_DIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}"
9-
)
7+
set(ENV{GISRC} "${BIN_DIR}/etc/config/rc")
108
set(ENV{GISBASE} "${BIN_DIR}")
119
set(ENV{PATH} "${BIN_DIR}/bin:${BIN_DIR}/scripts:$ENV{PATH}")
1210
set(ENV{PYTHONPATH}
@@ -19,12 +17,15 @@ set(ENV{LC_ALL} C)
1917
set(LIBRARIES)
2018
foreach(LIB ${LIBS})
2119
if(WIN32)
22-
list(APPEND LIBRARIES "--library=${BIN_DIR}/bin/${LIB}.dll")
20+
list(APPEND LIBRARIES
21+
"--library=${BIN_DIR}/lib/${LIB}.${GRASS_VERSION_NUMBER}.dll")
2322
elseif(APPLE)
24-
list(APPEND LIBRARIES "--library=${BIN_DIR}/lib/lib${LIB}.so")
23+
list(APPEND LIBRARIES
24+
"--library=${BIN_DIR}/lib/lib${LIB}.${GRASS_VERSION_NUMBER}.so")
2525
else()
2626
#This can be linux or unix
27-
list(APPEND LIBRARIES "--library=${BIN_DIR}/lib/lib${LIB}.so")
27+
list(APPEND LIBRARIES
28+
"--library=${BIN_DIR}/lib/lib${LIB}.${GRASS_VERSION_NUMBER}.so")
2829
endif()
2930
endforeach()
3031

python/grass/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ add_custom_target(
4949
python_pygrass_modules_interface
5050
python_pygrass_modules_grid)
5151

52-
#TODO: MODULES DISABLED
53-
# add_subdirectory(ctypes)
52+
add_subdirectory(ctypes)
5453

5554
set_target_properties(LIB_PYTHON PROPERTIES FOLDER lib)
5655

python/libgrass_interface_generator/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ foreach(module ${MODULES})
8888
${CMAKE_COMMAND} -DCTYPESGEN_PY=${CMAKE_CURRENT_SOURCE_DIR}/ctypesgen.py
8989
-DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -DCOMPILER=${CMAKE_C_COMPILER}
9090
-DBIN_DIR=${GISBASE} -DHDRS=${${module}_HDRS} -DLIBS=${${module}_LIBS}
91-
-DOUT_FILE=${output_file} -P ${CMAKE_SOURCE_DIR}/cmake/ctypesgen.cmake
91+
-DOUT_FILE=${output_file} -DGRASS_VERSION_NUMBER=${GRASS_VERSION_NUMBER}
92+
-P ${CMAKE_SOURCE_DIR}/cmake/ctypesgen.cmake
9293
COMMENT "Generating ${output_file}"
9394
VERBATIM)
9495

0 commit comments

Comments
 (0)