summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-01-09 14:35:49 +0000
committerSadie Powell <sadie@witchery.services>2024-01-09 14:35:49 +0000
commitfa7ad6b3dffaa769b62ea00e7c52e29fca67c7bf (patch)
treed5a63fc4fae57b07baf4240377f7b8a357f9de92 /modules
parentfc2df00cfcb51d9c5cf3640285e91e7d55c23eff (diff)
Use native file extensions on macOS and Windows.
Diffstat (limited to 'modules')
-rw-r--r--modules/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
index c0736cd84..98bcf54d4 100644
--- a/modules/CMakeLists.txt
+++ b/modules/CMakeLists.txt
@@ -55,8 +55,8 @@ macro(build_modules SRC)
set_source_files_properties(${MODULE_SRC} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
file(RELATIVE_PATH FNAME ${SRC} ${MODULE_SRC})
- # Convert the real source file extension to have a .so extension
- string(REGEX REPLACE "\\.cpp$" ".so" SO ${FNAME})
+ # Convert the real source file extension to have a library extension
+ string(REGEX REPLACE "\\.cpp$" "${CMAKE_SHARED_LIBRARY_SUFFIX}" SO ${FNAME})
# Reset linker flags
set(TEMP_LDFLAGS)
# Reset extra dependencies
@@ -111,7 +111,7 @@ macro(build_subdir)
list(SORT MODULES_SUBDIR_SRCS)
GET_FILENAME_COMPONENT(FOLDER_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
- set(SO "${FOLDER_NAME}.so")
+ set(SO "${FOLDER_NAME}.${CMAKE_SHARED_LIBRARY_SUFFIX}")
# Set all the files to use C++ as well as set their compile flags (use the module-specific compile flags, though)
set_source_files_properties(${MODULES_SUBDIR_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")