Revision: 70053 http://sourceforge.net/p/brlcad/code/70053 Author: starseeker Date: 2017-08-07 15:24:23 +0000 (Mon, 07 Aug 2017) Log Message: ----------- Try a mechanism to 'override' the dll import/export mechanism when we're doing static builds with MSVC. I think this will prove simpler than trying to apply or not apply the DLL import/export definitions based on the build type, if it works. (not tested yet with MSVC)
Modified Paths: -------------- brlcad/trunk/CMakeLists.txt brlcad/trunk/include/analyze.h brlcad/trunk/include/bg/defines.h brlcad/trunk/include/bn/defines.h brlcad/trunk/include/brep/defines.h brlcad/trunk/include/bu/defines.h brlcad/trunk/include/cursor.h brlcad/trunk/include/dm/defines.h brlcad/trunk/include/fb.h brlcad/trunk/include/fft.h brlcad/trunk/include/gcv/defines.h brlcad/trunk/include/ged/defines.h brlcad/trunk/include/icv/defines.h brlcad/trunk/include/nmg.h brlcad/trunk/include/optical/defines.h brlcad/trunk/include/pc.h brlcad/trunk/include/pkg.h brlcad/trunk/include/rt/db5.h brlcad/trunk/include/rt/defines.h brlcad/trunk/include/rt/tie.h brlcad/trunk/include/tclcad.h brlcad/trunk/include/wdb.h brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake brlcad/trunk/src/adrt/librender/render_internal.h brlcad/trunk/src/libbrep/libbrep_brep_tools.h brlcad/trunk/src/libbu/y2038/time64.h brlcad/trunk/src/libfft/CMakeLists.txt brlcad/trunk/src/libgcv/plugins/obj/wfobj/obj_util.h Modified: brlcad/trunk/CMakeLists.txt =================================================================== --- brlcad/trunk/CMakeLists.txt 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/CMakeLists.txt 2017-08-07 15:24:23 UTC (rev 70053) @@ -126,9 +126,9 @@ set(CPP_DLL_DEFINES 1) endif(MSVC) -# If we can, use OBJECT libraries to build both shared and static -# libraries from the same .o files, saving double compilation -cmake_dependent_option(USE_OBJECT_LIBS "Use OBJECT libraries" ON "NOT CPP_DLL_DEFINES" OFF) +# Use OBJECT libraries +option(USE_OBJECT_LIBS "Use OBJECT libraries" ON) +mark_as_advanced(USE_OBJECT_LIBS) #--------------------------------------------------------------------- # Load general utility routines for BRL-CAD CMake logic Modified: brlcad/trunk/include/analyze.h =================================================================== --- brlcad/trunk/include/analyze.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/analyze.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -37,6 +37,8 @@ #ifndef ANALYZE_EXPORT # if defined(ANALYZE_DLL_EXPORTS) && defined(ANALYZE_DLL_IMPORTS) # error "Only ANALYZE_DLL_EXPORTS or ANALYZE_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define ANALYZE_EXPORT # elif defined(ANALYZE_DLL_EXPORTS) # define ANALYZE_EXPORT __declspec(dllexport) # elif defined(ANALYZE_DLL_IMPORTS) Modified: brlcad/trunk/include/bg/defines.h =================================================================== --- brlcad/trunk/include/bg/defines.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/bg/defines.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -34,6 +34,8 @@ #ifndef BG_EXPORT # if defined(BG_DLL_EXPORTS) && defined(BG_DLL_IMPORTS) # error "Only BG_DLL_EXPORTS or BG_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define BG_EXPORT # elif defined(BG_DLL_EXPORTS) # define BG_EXPORT __declspec(dllexport) # elif defined(BG_DLL_IMPORTS) Modified: brlcad/trunk/include/bn/defines.h =================================================================== --- brlcad/trunk/include/bn/defines.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/bn/defines.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -33,6 +33,8 @@ #ifndef BN_EXPORT # if defined(BN_DLL_EXPORTS) && defined(BN_DLL_IMPORTS) # error "Only BN_DLL_EXPORTS or BN_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define BN_EXPORT # elif defined(BN_DLL_EXPORTS) # define BN_EXPORT __declspec(dllexport) # elif defined(BN_DLL_IMPORTS) Modified: brlcad/trunk/include/brep/defines.h =================================================================== --- brlcad/trunk/include/brep/defines.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/brep/defines.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -35,6 +35,8 @@ #ifndef BREP_EXPORT # if defined(BREP_DLL_EXPORTS) && defined(BREP_DLL_IMPORTS) # error "Only BREP_DLL_EXPORTS or BREP_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define BREP_EXPORT # elif defined(BREP_DLL_EXPORTS) # define BREP_EXPORT __declspec(dllexport) # elif defined(BREP_DLL_IMPORTS) Modified: brlcad/trunk/include/bu/defines.h =================================================================== --- brlcad/trunk/include/bu/defines.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/bu/defines.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -37,6 +37,8 @@ #ifndef BU_EXPORT # if defined(BU_DLL_EXPORTS) && defined(BU_DLL_IMPORTS) # error "Only BU_DLL_EXPORTS or BU_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define BU_EXPORT # elif defined(BU_DLL_EXPORTS) # define BU_EXPORT __declspec(dllexport) # elif defined(BU_DLL_IMPORTS) Modified: brlcad/trunk/include/cursor.h =================================================================== --- brlcad/trunk/include/cursor.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/cursor.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -37,6 +37,8 @@ #ifndef CURSOR_EXPORT # if defined(CURSOR_DLL_EXPORTS) && defined(CURSOR_DLL_IMPORTS) # error "Only CURSOR_DLL_EXPORTS or CURSOR_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define CURSOR_EXPORT # elif defined(CURSOR_DLL_EXPORTS) # define CURSOR_EXPORT __declspec(dllexport) # elif defined(CURSOR_DLL_IMPORTS) Modified: brlcad/trunk/include/dm/defines.h =================================================================== --- brlcad/trunk/include/dm/defines.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/dm/defines.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -25,6 +25,8 @@ #ifndef DM_EXPORT # if defined(DM_DLL_EXPORTS) && defined(DM_DLL_IMPORTS) # error "Only DM_DLL_EXPORTS or DM_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define DM_EXPORT # elif defined(DM_DLL_EXPORTS) # define DM_EXPORT __declspec(dllexport) # elif defined(DM_DLL_IMPORTS) Modified: brlcad/trunk/include/fb.h =================================================================== --- brlcad/trunk/include/fb.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/fb.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -31,6 +31,8 @@ #ifndef FB_EXPORT # if defined(FB_DLL_EXPORTS) && defined(FB_DLL_IMPORTS) # error "Only FB_DLL_EXPORTS or FB_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define FB_EXPORT # elif defined(FB_DLL_EXPORTS) # define FB_EXPORT __declspec(dllexport) # elif defined(FB_DLL_IMPORTS) Modified: brlcad/trunk/include/fft.h =================================================================== --- brlcad/trunk/include/fft.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/fft.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -43,6 +43,8 @@ #ifndef FFT_EXPORT # if defined(FFT_DLL_EXPORTS) && defined(FFT_DLL_IMPORTS) # error "Only FFT_DLL_EXPORTS or FFT_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define FFT_EXPORT # elif defined(FFT_DLL_EXPORTS) # define FFT_EXPORT __declspec(dllexport) # elif defined(FFT_DLL_IMPORTS) Modified: brlcad/trunk/include/gcv/defines.h =================================================================== --- brlcad/trunk/include/gcv/defines.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/gcv/defines.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -33,6 +33,8 @@ #ifndef GCV_EXPORT # if defined(GCV_DLL_EXPORTS) && defined(GCV_DLL_IMPORTS) # error "Only GCV_DLL_EXPORTS or GCV_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define GCV_EXPORT # elif defined(GCV_DLL_EXPORTS) # define GCV_EXPORT __declspec(dllexport) # elif defined(GCV_DLL_IMPORTS) Modified: brlcad/trunk/include/ged/defines.h =================================================================== --- brlcad/trunk/include/ged/defines.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/ged/defines.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -39,6 +39,8 @@ #ifndef GED_EXPORT # if defined(GED_DLL_EXPORTS) && defined(GED_DLL_IMPORTS) # error "Only GED_DLL_EXPORTS or GED_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define GED_EXPORT # elif defined(GED_DLL_EXPORTS) # define GED_EXPORT __declspec(dllexport) # elif defined(GED_DLL_IMPORTS) Modified: brlcad/trunk/include/icv/defines.h =================================================================== --- brlcad/trunk/include/icv/defines.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/icv/defines.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -38,6 +38,8 @@ #ifndef ICV_EXPORT # if defined(ICV_DLL_EXPORTS) && defined(ICV_DLL_IMPORTS) # error "Only ICV_DLL_EXPORTS or ICV_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define ICV_EXPORT # elif defined(ICV_DLL_EXPORTS) # define ICV_EXPORT __declspec(dllexport) # elif defined(ICV_DLL_IMPORTS) Modified: brlcad/trunk/include/nmg.h =================================================================== --- brlcad/trunk/include/nmg.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/nmg.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -72,6 +72,8 @@ #ifndef NMG_EXPORT # if defined(NMG_DLL_EXPORTS) && defined(NMG_DLL_IMPORTS) # error "Only NMG_DLL_EXPORTS or NMG_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define NMG_EXPORT # elif defined(NMG_DLL_EXPORTS) # define NMG_EXPORT __declspec(dllexport) # elif defined(NMG_DLL_IMPORTS) Modified: brlcad/trunk/include/optical/defines.h =================================================================== --- brlcad/trunk/include/optical/defines.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/optical/defines.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -41,6 +41,8 @@ #ifndef OPTICAL_EXPORT # if defined(OPTICAL_DLL_EXPORTS) && defined(OPTICAL_DLL_IMPORTS) # error "Only OPTICAL_DLL_EXPORTS or OPTICAL_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define OPTICAL_EXPORT # elif defined(OPTICAL_DLL_EXPORTS) # define OPTICAL_EXPORT __declspec(dllexport) # elif defined(OPTICAL_DLL_IMPORTS) Modified: brlcad/trunk/include/pc.h =================================================================== --- brlcad/trunk/include/pc.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/pc.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -38,6 +38,8 @@ #ifndef PC_EXPORT # if defined(PC_DLL_EXPORTS) && defined(PC_DLL_IMPORTS) # error "Only PC_DLL_EXPORTS or PC_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define PC_EXPORT # elif defined(PC_DLL_EXPORTS) # define PC_EXPORT __declspec(dllexport) # elif defined(PC_DLL_IMPORTS) Modified: brlcad/trunk/include/pkg.h =================================================================== --- brlcad/trunk/include/pkg.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/pkg.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -37,6 +37,8 @@ #ifndef PKG_EXPORT # if defined(PKG_DLL_EXPORTS) && defined(PKG_DLL_IMPORTS) # error "Only PKG_DLL_EXPORTS or PKG_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define PKG_EXPORT # elif defined(PKG_DLL_EXPORTS) # define PKG_EXPORT __declspec(dllexport) # elif defined(PKG_DLL_IMPORTS) Modified: brlcad/trunk/include/rt/db5.h =================================================================== --- brlcad/trunk/include/rt/db5.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/rt/db5.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -40,6 +40,8 @@ #ifndef RT_EXPORT # if defined(RT_DLL_EXPORTS) && defined(RT_DLL_IMPORTS) # error "Only RT_DLL_EXPORTS or RT_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define RT_EXPORT # elif defined(RT_DLL_EXPORTS) # define RT_EXPORT __declspec(dllexport) # elif defined(RT_DLL_IMPORTS) Modified: brlcad/trunk/include/rt/defines.h =================================================================== --- brlcad/trunk/include/rt/defines.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/rt/defines.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -32,6 +32,8 @@ #ifndef RT_EXPORT # if defined(RT_DLL_EXPORTS) && defined(RT_DLL_IMPORTS) # error "Only RT_DLL_EXPORTS or RT_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define RT_EXPORT # elif defined(RT_DLL_EXPORTS) # define RT_EXPORT __declspec(dllexport) # elif defined(RT_DLL_IMPORTS) Modified: brlcad/trunk/include/rt/tie.h =================================================================== --- brlcad/trunk/include/rt/tie.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/rt/tie.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -34,6 +34,8 @@ #ifndef RT_EXPORT # if defined(RT_DLL_EXPORTS) && defined(RT_DLL_IMPORTS) # error "Only RT_DLL_EXPORTS or RT_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define RT_EXPORT # elif defined(RT_DLL_EXPORTS) # define RT_EXPORT __declspec(dllexport) # elif defined(RT_DLL_IMPORTS) Modified: brlcad/trunk/include/tclcad.h =================================================================== --- brlcad/trunk/include/tclcad.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/tclcad.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -45,6 +45,8 @@ #ifndef TCLCAD_EXPORT # if defined(TCLCAD_DLL_EXPORTS) && defined(TCLCAD_DLL_IMPORTS) # error "Only TCLCAD_DLL_EXPORTS or TCLCAD_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define TCLCAD_EXPORT # elif defined(TCLCAD_DLL_EXPORTS) # define TCLCAD_EXPORT __declspec(dllexport) # elif defined(TCLCAD_DLL_IMPORTS) Modified: brlcad/trunk/include/wdb.h =================================================================== --- brlcad/trunk/include/wdb.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/include/wdb.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -58,6 +58,8 @@ #ifndef WDB_EXPORT # if defined(WDB_DLL_EXPORTS) && defined(WDB_DLL_IMPORTS) # error "Only WDB_DLL_EXPORTS or WDB_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define WDB_EXPORT # elif defined(WDB_DLL_EXPORTS) # define WDB_EXPORT __declspec(dllexport) # elif defined(WDB_DLL_IMPORTS) Modified: brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake =================================================================== --- brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake 2017-08-07 15:24:23 UTC (rev 70053) @@ -368,15 +368,19 @@ cmake_parse_arguments(L "SHARED;STATIC;NO_INSTALL;NO_STRICT;NO_STRICT_CXX" "FOLDER" "SHARED_SRCS;STATIC_SRCS" ${ARGN}) + # Let CMAKEFILES know what's going on + CMAKEFILES(${srcslist} ${L_SHARED_SRCS} ${L_STATIC_SRCS}) + # Go all C++ if the settings request it SET_LANG_CXX("${srcslist};${L_SHARED_SRCS};${L_STATIC_SRCS}") # Handle the build flags and the general definitions common to both shared and static - GET_FLAGS_AND_DEFINITIONS(${libname} "${libslist}" NO_DLL CFLAGS L_C_FLAGS CXXFLAGS L_CXX_FLAGS DEFINES L_DEFINES) + GET_FLAGS_AND_DEFINITIONS(${libname} "${libslist}" CFLAGS L_C_FLAGS CXXFLAGS L_CXX_FLAGS DEFINES L_DEFINES) SET_FLAGS_AND_DEFINITIONS("${srcslist};${L_SHARED_SRCS};${L_STATIC_SRCS}" TARGET ${libname} CFLAGS "${L_C_FLAGS}" CXXFLAGS "${L_CXX_FLAGS}" DEFINES "${L_DEFINES}") # Local copy of srcslist in case manipulation is needed - set(lsrcslist ${srcslist}) + set(lsrcslist-shared ${srcslist} ${L_SHARED_SRCS}) + set(lsrcslist-static ${srcslist} ${L_STATIC_SRCS}) # If we're going to have a specified subfolder, prepare the appropriate string: if(L_FOLDER) @@ -383,18 +387,25 @@ set(SUBFOLDER "/${L_FOLDER}") endif(L_FOLDER) - # Let CMAKEFILES know what's going on - CMAKEFILES(${lsrcslist} ${L_SHARED_SRCS} ${L_STATIC_SRCS}) - # If we need it, set up the OBJECT library build if(USE_OBJECT_LIBS) - add_library(${libname}-obj OBJECT ${lsrcslist}) - set(lsrcslist $<TARGET_OBJECTS:${libname}-obj>) + add_library(${libname}-obj OBJECT ${lsrcslist-shared}) + set(lsrcslist-shared $<TARGET_OBJECTS:${libname}-obj>) set_target_properties(${libname}-obj PROPERTIES FOLDER "BRL-CAD OBJECT Libraries${SUBFOLDER}") + if(CPP_DLL_DEFINES) + # Static Visual C++ builds shouldn't have the dll import/export logic set,so in that case + # we need to build separate objects + add_library(${libname}-obj-static OBJECT ${lsrcslist-static}) + set(lsrcslist-static $<TARGET_OBJECTS:${libname}-obj-static>) + target_compile_definitions(${libname}-obj-static PRIVATE STATIC_BUILD) + set_target_properties(${libname}-obj-static PROPERTIES FOLDER "BRL-CAD OBJECT Libraries${SUBFOLDER}") + else(CPP_DLL_DEFINES) + set(lsrcslist-static $<TARGET_OBJECTS:${libname}-obj>) + endif(CPP_DLL_DEFINES) endif(USE_OBJECT_LIBS) if(BUILD_SHARED_LIBS) - add_library(${libname} SHARED ${lsrcslist} ${L_SHARED_SRCS}) + add_library(${libname} SHARED ${lsrcslist-shared}) string(REPLACE "lib" "" LOWERCORE "${libname}") string(TOUPPER ${LOWERCORE} UPPER_CORE) if(CPP_DLL_DEFINES) @@ -403,7 +414,10 @@ endif(CPP_DLL_DEFINES) endif(BUILD_SHARED_LIBS) if(BUILD_STATIC_LIBS) - add_library(${libname}-static STATIC ${lsrcslist} ${L_STATIC_SRCS}) + add_library(${libname}-static STATIC ${lsrcslist-static}) + if(USE_OBJECT_LIBS AND CPP_DLL_DEFINES) + target_compile_definitions(${libname}-static PRIVATE STATIC_BUILD) + endif(USE_OBJECT_LIBS AND CPP_DLL_DEFINES) endif(BUILD_STATIC_LIBS) # Make sure we don't end up with outputs named liblib... Modified: brlcad/trunk/src/adrt/librender/render_internal.h =================================================================== --- brlcad/trunk/src/adrt/librender/render_internal.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/src/adrt/librender/render_internal.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -29,6 +29,8 @@ #ifndef RENDER_EXPORT # if defined(RENDER_DLL_EXPORTS) && defined(RENDER_DLL_IMPORTS) # error "Only RENDER_DLL_EXPORTS or RENDER_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define RENDER_EXPORT # elif defined(RENDER_DLL_EXPORTS) # define RENDER_EXPORT __declspec(dllexport) # elif defined(RENDER_DLL_IMPORTS) Modified: brlcad/trunk/src/libbrep/libbrep_brep_tools.h =================================================================== --- brlcad/trunk/src/libbrep/libbrep_brep_tools.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/src/libbrep/libbrep_brep_tools.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -57,6 +57,8 @@ #ifndef BREP_EXPORT # if defined(BREP_DLL_EXPORTS) && defined(BREP_DLL_IMPORTS) # error "Only BREP_DLL_EXPORTS or BREP_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define BREP_EXPORT # elif defined(BREP_DLL_EXPORTS) # define BREP_EXPORT __declspec(dllexport) # elif defined(BREP_DLL_IMPORTS) Modified: brlcad/trunk/src/libbu/y2038/time64.h =================================================================== --- brlcad/trunk/src/libbu/y2038/time64.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/src/libbu/y2038/time64.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -6,6 +6,8 @@ #ifndef Y2038_EXPORT # if defined(Y2038_DLL_EXPORTS) && defined(Y2038_DLL_IMPORTS) # error "Only Y2038_DLL_EXPORTS or Y2038_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define Y2038_EXPORT # elif defined(Y2038_DLL_EXPORTS) # define Y2038_EXPORT __declspec(dllexport) # elif defined(Y2038_DLL_IMPORTS) Modified: brlcad/trunk/src/libfft/CMakeLists.txt =================================================================== --- brlcad/trunk/src/libfft/CMakeLists.txt 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/src/libfft/CMakeLists.txt 2017-08-07 15:24:23 UTC (rev 70053) @@ -47,15 +47,9 @@ splitdit.c ditsplit.c ) -if(USE_OBJECT_LIBS) - fft_gen("${FFT_NUMLIST}" "${CMAKE_CURRENT_BINARY_DIR}" FFT_GEN_SRCS) - set(LIBFFT_SRCS ${LIBFFT_SRCS} ${FFT_GEN_SRCS}) - BRLCAD_ADDLIB(libfft "${LIBFFT_SRCS}" "${M_LIBRARY}") -else(USE_OBJECT_LIBS) - fft_gen("${FFT_NUMLIST}" "${CMAKE_CURRENT_BINARY_DIR}/shared" FFT_GEN_SHARED_SRCS) - fft_gen("${FFT_NUMLIST}" "${CMAKE_CURRENT_BINARY_DIR}/static" FFT_GEN_STATIC_SRCS) - BRLCAD_ADDLIB(libfft "${LIBFFT_SRCS}" "${M_LIBRARY}" SHARED_SRCS "${FFT_GEN_SHARED_SRCS}" STATIC_SRCS "${FFT_GEN_STATIC_SRCS}") -endif(USE_OBJECT_LIBS) +fft_gen("${FFT_NUMLIST}" "${CMAKE_CURRENT_BINARY_DIR}/shared" FFT_GEN_SHARED_SRCS) +fft_gen("${FFT_NUMLIST}" "${CMAKE_CURRENT_BINARY_DIR}/static" FFT_GEN_STATIC_SRCS) +BRLCAD_ADDLIB(libfft "${LIBFFT_SRCS}" "${M_LIBRARY}" SHARED_SRCS "${FFT_GEN_SHARED_SRCS}" STATIC_SRCS "${FFT_GEN_STATIC_SRCS}") set_target_properties(libfft PROPERTIES LINKER_LANGUAGE C) set_target_properties(libfft PROPERTIES VERSION 20.0.1 SOVERSION 20) Modified: brlcad/trunk/src/libgcv/plugins/obj/wfobj/obj_util.h =================================================================== --- brlcad/trunk/src/libgcv/plugins/obj/wfobj/obj_util.h 2017-08-07 05:29:54 UTC (rev 70052) +++ brlcad/trunk/src/libgcv/plugins/obj/wfobj/obj_util.h 2017-08-07 15:24:23 UTC (rev 70053) @@ -31,6 +31,8 @@ #ifndef WFOBJ_EXPORT # if defined(WFOBJ_DLL_EXPORTS) && defined(WFOBJ_DLL_IMPORTS) # error "Only WFOBJ_DLL_EXPORTS or WFOBJ_DLL_IMPORTS can be defined, not both." +# elif defined(STATIC_BUILD) +# define WFOBJ_EXPORT # elif defined(WFOBJ_DLL_EXPORTS) # define WFOBJ_EXPORT __declspec(dllexport) # elif defined(WFOBJ_DLL_IMPORTS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits