aboutsummaryrefslogtreecommitdiff
path: root/ports/cspice/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'ports/cspice/CMakeLists.txt')
-rw-r--r--ports/cspice/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/ports/cspice/CMakeLists.txt b/ports/cspice/CMakeLists.txt
index e82b3a280..af5c3e22b 100644
--- a/ports/cspice/CMakeLists.txt
+++ b/ports/cspice/CMakeLists.txt
@@ -18,8 +18,12 @@ if (WIN32)
target_compile_definitions(cspice PUBLIC "_COMPLEX_DEFINED;MSDOS;OMIT_BLANK_CC;NON_ANSI_STDIO")
set_target_properties(cspice PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
elseif (UNIX)
- target_compile_definitions(cspice PUBLIC "NON_ANSI_STDIO")
- target_compile_options(cspice PUBLIC -m64 -ansi -fPIC)
+ target_compile_definitions(cspice PUBLIC "NON_UNIX_STDIO")
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ target_compile_options(cspice PUBLIC -m64 -ansi -fPIC)
+ elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ target_compile_options(cspice PUBLIC -m32 -ansi -fPIC)
+ endif()
endif ()
if (NOT _SKIP_HEADERS)