Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Simox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Leander Singer
Simox
Commits
ad20686f
Commit
ad20686f
authored
3 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Fix adding libraries without source files
parent
df559d40
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SimoxQtUtility/CMakeLists.txt
+39
-25
39 additions, 25 deletions
SimoxQtUtility/CMakeLists.txt
SimoxUtility/CMakeLists.txt
+59
-49
59 additions, 49 deletions
SimoxUtility/CMakeLists.txt
with
98 additions
and
74 deletions
SimoxQtUtility/CMakeLists.txt
+
39
−
25
View file @
ad20686f
PROJECT
(
SimoxQtUtility
)
MESSAGE
(
STATUS
"
\n
***** CONFIGURING Simox project SimoxQtUtility *****"
)
#################################### FILES ##################################
SET
(
SOURCES
)
SET
(
INCLUDES
)
if
(
qwt_FOUND
)
list
(
APPEND INCLUDES
qwt/SimoxQwtColorMap.h
qwt/SimoxQwtSpectrogramData.h
)
list
(
APPEND SOURCES
qwt/SimoxQwtColorMap.cpp
qwt/SimoxQwtSpectrogramData.cpp
)
endif
()
# Generate subdirectory headers
simox_generate_subdir_headers
(
${
CMAKE_CURRENT_LIST_DIR
}
${
CMAKE_CURRENT_LIST_DIR
}
INCLUDES
)
#######################################################################
# Add library
#######################################################################
set
(
CMAKE_INCLUDE_CURRENT_DIR OFF
)
add_library
(
SimoxQtUtility SHARED
)
add_library
(
SimoxQtUtility SHARED
${
SOURCES
}
${
INCLUDES
}
)
target_include_directories
(
SimoxQtUtility PUBLIC
$<BUILD_INTERFACE:
${
Simox_SOURCE_DIR
}
>
...
...
@@ -11,10 +46,12 @@ target_include_directories(SimoxQtUtility PUBLIC
target_compile_options
(
SimoxQtUtility PUBLIC
${
Simox_OS_compile_options
}
)
target_link_libraries
(
SimoxQtUtility PUBLIC SimoxUtility
)
#######################################################################
# Setup dependencies
#######################################################################
####
####
if
(
Qt5_FOUND
)
MESSAGE
(
STATUS
"Found Qt5: "
${
Qt5Gui_INCLUDE_DIRS
}
${
Qt5OpenGL_INCLUDE_DIRS
}
)
target_link_libraries
(
SimoxQtUtility PUBLIC Qt5::Core Qt5::Gui Qt5::OpenGL Qt5::Widgets
)
...
...
@@ -29,29 +66,8 @@ if (qwt_FOUND)
else
()
MESSAGE
(
STATUS
"Did not find Qwt. Disabling Qwt support."
)
endif
()
##########################################################################################################
##########################################################################################################
##########################################################################################################
MESSAGE
(
STATUS
"
\n
***** CONFIGURING Simox project SimoxQtUtility *****"
)
#################################### FILES ##################################
SET
(
SOURCES
)
SET
(
INCLUDES
)
if
(
qwt_FOUND
)
list
(
APPEND INCLUDES qwt/SimoxQwtColorMap.h
qwt/SimoxQwtSpectrogramData.h
)
list
(
APPEND SOURCES qwt/SimoxQwtColorMap.cpp
qwt/SimoxQwtSpectrogramData.cpp
)
endif
()
##########################################################################################################
#################################### generate_subdir_headers ##################################
simox_generate_subdir_headers
(
${
CMAKE_CURRENT_LIST_DIR
}
${
CMAKE_CURRENT_LIST_DIR
}
INCLUDES
)
##########################################################################################################
##########################################################################################################
##########################################################################################################
...
...
@@ -67,8 +83,6 @@ endif()
# Finished adding UI files
#-----------------------------------------------------------------------------------
set_target_properties
(
SimoxQtUtility PROPERTIES SOURCES
"
${
SOURCES
}
;
${
INCLUDES
}
"
)
SET_TARGET_PROPERTIES
(
SimoxQtUtility PROPERTIES RUNTIME_OUTPUT_DIRECTORY
${
Simox_BIN_DIR
}
)
SET_TARGET_PROPERTIES
(
SimoxQtUtility PROPERTIES LIBRARY_OUTPUT_DIRECTORY
${
Simox_LIB_DIR
}
)
SET_TARGET_PROPERTIES
(
SimoxQtUtility PROPERTIES ARCHIVE_OUTPUT_DIRECTORY
${
Simox_LIB_DIR
}
)
...
...
This diff is collapsed.
Click to expand it.
SimoxUtility/CMakeLists.txt
+
59
−
49
View file @
ad20686f
PROJECT
(
SimoxUtility
)
set
(
CMAKE_INCLUDE_CURRENT_DIR OFF
)
add_library
(
SimoxUtility SHARED
)
# SimoxUtility.h) # sources will be added later
target_include_directories
(
SimoxUtility PUBLIC
$<BUILD_INTERFACE:
${
Simox_SOURCE_DIR
}
>
$<BUILD_INTERFACE:
${
Simox_BINARY_DIR
}
>
$<INSTALL_INTERFACE:include>
)
target_compile_options
(
SimoxUtility PUBLIC
${
Simox_OS_compile_options
}
)
target_link_libraries
(
SimoxUtility PUBLIC stdc++fs
)
#######################################################################
# Setup dependencies
#######################################################################
#### Eigen
target_include_directories
(
SimoxUtility SYSTEM PUBLIC
${
Eigen3_INCLUDE_DIR
}
)
#### BOOST
target_link_libraries
(
SimoxUtility PUBLIC
Boost::boost
Boost::program_options
Boost::thread
Boost::regex
)
target_compile_options
(
SimoxUtility PUBLIC -include SimoxUtility/eigen/AssertAsException.h
)
MESSAGE
(
STATUS
"
\n
***** CONFIGURING Simox project SimoxUtility *****"
)
# disable boost auto linking
if
(
Boost_USE_STATIC_LIBS
)
target_compile_definitions
(
SimoxUtility PUBLIC -DBOOST_ALL_NO_LIB -DBOOST_TEST_MAIN
)
else
(
Boost_USE_STATIC_LIBS
)
# enable dynamic linking for specific boost libraries
target_compile_definitions
(
SimoxUtility PUBLIC
-DBOOST_ALL_NO_LIB
-DBOOST_PROGRAM_OPTIONS_DYN_LINK
-DBOOST_FILESYSTEM_DYN_LINK
-DBOOST_SYSTEM_DYN_LINK
-DBOOST_THREAD_DYN_LINK
)
endif
()
##########################################################################################################
##########################################################################################################
##########################################################################################################
MESSAGE
(
STATUS
"
\n
***** CONFIGURING Simox project SimoxUtility *****"
)
#################################### FILES ##################################
SET
(
SOURCES
...
...
@@ -272,6 +234,64 @@ SET(INCLUDES
threads/CountingSemaphore.h
)
# Generate subdirectory headers
simox_generate_subdir_headers
(
${
CMAKE_CURRENT_LIST_DIR
}
${
CMAKE_CURRENT_LIST_DIR
}
INCLUDES
)
#######################################################################
# Add library
#######################################################################
set
(
CMAKE_INCLUDE_CURRENT_DIR OFF
)
add_library
(
SimoxUtility SHARED
${
SOURCES
}
${
INCLUDES
}
)
target_include_directories
(
SimoxUtility PUBLIC
$<BUILD_INTERFACE:
${
Simox_SOURCE_DIR
}
>
$<BUILD_INTERFACE:
${
Simox_BINARY_DIR
}
>
$<INSTALL_INTERFACE:include>
)
target_compile_options
(
SimoxUtility PUBLIC
${
Simox_OS_compile_options
}
)
target_link_libraries
(
SimoxUtility PUBLIC stdc++fs
)
#######################################################################
# Setup dependencies
#######################################################################
#### Eigen
target_include_directories
(
SimoxUtility SYSTEM PUBLIC
${
Eigen3_INCLUDE_DIR
}
)
#### BOOST
target_link_libraries
(
SimoxUtility PUBLIC
Boost::boost
Boost::program_options
Boost::thread
Boost::regex
)
target_compile_options
(
SimoxUtility PUBLIC -include SimoxUtility/eigen/AssertAsException.h
)
# disable boost auto linking
if
(
Boost_USE_STATIC_LIBS
)
target_compile_definitions
(
SimoxUtility PUBLIC -DBOOST_ALL_NO_LIB -DBOOST_TEST_MAIN
)
else
(
Boost_USE_STATIC_LIBS
)
# enable dynamic linking for specific boost libraries
target_compile_definitions
(
SimoxUtility PUBLIC
-DBOOST_ALL_NO_LIB
-DBOOST_PROGRAM_OPTIONS_DYN_LINK
-DBOOST_FILESYSTEM_DYN_LINK
-DBOOST_SYSTEM_DYN_LINK
-DBOOST_THREAD_DYN_LINK
)
endif
()
##########################################################################################################
#################################### generate meta functions ##################################
...
...
@@ -321,14 +341,6 @@ make_check_for_member(
)
##########################################################################################################
#################################### generate_subdir_headers ##################################
simox_generate_subdir_headers
(
${
CMAKE_CURRENT_LIST_DIR
}
${
CMAKE_CURRENT_LIST_DIR
}
INCLUDES
)
##########################################################################################################
##########################################################################################################
##########################################################################################################
...
...
@@ -344,8 +356,6 @@ endif()
# Finished adding UI files
#-----------------------------------------------------------------------------------
set_target_properties
(
SimoxUtility PROPERTIES SOURCES
"
${
SOURCES
}
;
${
INCLUDES
}
"
)
SET_TARGET_PROPERTIES
(
SimoxUtility PROPERTIES RUNTIME_OUTPUT_DIRECTORY
${
Simox_BIN_DIR
}
)
SET_TARGET_PROPERTIES
(
SimoxUtility PROPERTIES LIBRARY_OUTPUT_DIRECTORY
${
Simox_LIB_DIR
}
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment