diff --git a/CMakeLists.txt b/CMakeLists.txt index 7be750b02..335fc76c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,9 +130,10 @@ if (GTSAM_BUILD_UNSTABLE) add_subdirectory(gtsam_unstable) endif(GTSAM_BUILD_UNSTABLE) -# Make config file +# Make config files include(GtsamMakeConfigFile) -GtsamMakeConfigFile(gtsam) +GtsamMakeConfigFile(GTSAM gtsam-static) +GtsamMakeConfigFile(CppUnitLite CppUnitLite) # Set up CPack set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GTSAM") diff --git a/CppUnitLite/CMakeLists.txt b/CppUnitLite/CMakeLists.txt index 642e8e462..286a39258 100644 --- a/CppUnitLite/CMakeLists.txt +++ b/CppUnitLite/CMakeLists.txt @@ -5,6 +5,8 @@ file(GLOB cppunitlite_src "*.cpp") add_library(CppUnitLite STATIC ${cppunitlite_src}) +gtsam_assign_source_folders("${cppunitlite_headers};${cppunitlite_src}") # MSVC project structure + option(GTSAM_INSTALL_CPPUNITLITE "Enable/Disable installation of CppUnitLite library" ON) if (GTSAM_INSTALL_CPPUNITLITE) install(FILES ${cppunitlite_headers} DESTINATION include/CppUnitLite) diff --git a/gtsam/CMakeLists.txt b/gtsam/CMakeLists.txt index 8dd9a72ce..80c57c15c 100644 --- a/gtsam/CMakeLists.txt +++ b/gtsam/CMakeLists.txt @@ -19,9 +19,10 @@ add_subdirectory(3rdparty) # build convenience library set (3rdparty_srcs - 3rdparty/CCOLAMD/Source/ccolamd.c - 3rdparty/CCOLAMD/Source/ccolamd_global.c - 3rdparty/UFconfig/UFconfig.c) + ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/CCOLAMD/Source/ccolamd.c + ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/CCOLAMD/Source/ccolamd_global.c + ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/UFconfig/UFconfig.c) +gtsam_assign_source_folders("${3rdparty_srcs}") # Create MSVC structure if (GTSAM_BUILD_CONVENIENCE_LIBRARIES) message(STATUS "Building Convenience Library: ccolamd") add_library(ccolamd STATIC ${3rdparty_srcs}) @@ -48,6 +49,7 @@ foreach(subdir ${gtsam_subdirs}) file(GLOB subdir_srcs "${subdir}/*.cpp") file(GLOB subdir_headers "${subdir}/*.h") set(subdir_srcs ${subdir_srcs} ${subdir_headers}) # Include header files so they show up in Visual Studio + gtsam_assign_source_folders("${subdir_srcs}") # Create MSVC structure list(REMOVE_ITEM subdir_srcs ${excluded_sources}) set(${subdir}_srcs ${subdir_srcs}) if (GTSAM_BUILD_CONVENIENCE_LIBRARIES) @@ -73,9 +75,6 @@ set(gtsam_srcs ${slam_srcs} ) -# Create MSVC structure -gtsam_assign_all_source_folders() - # Versions set(gtsam_version ${GTSAM_VERSION_MAJOR}.${GTSAM_VERSION_MINOR}.${GTSAM_VERSION_PATCH}) set(gtsam_soversion ${GTSAM_VERSION_MAJOR})