Skip to content

Commit

Permalink
Changed CMake to output .a and .so files with same basename
Browse files Browse the repository at this point in the history
  • Loading branch information
Erroneous1 committed Mar 30, 2016
1 parent 0d86ca7 commit 4c9eb4f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,22 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

add_library(sqlpp-odbc-static
add_library(sqlpp-odbc-static STATIC
connection.cpp
bind_result.cpp
prepared_statement.cpp
detail/connection_handle.cpp)

install(TARGETS sqlpp-odbc-static DESTINATION lib)

add_library(sqlpp-odbc-shared SHARED
connection.cpp
bind_result.cpp
prepared_statement.cpp
detail/connection_handle.cpp)

set_target_properties(sqlpp-odbc-shared PROPERTIES OUTPUT_NAME sqlpp-odbc)
#Use sqlpp-odbc as the name unless using Windows
if(NOT WIN32)
set_target_properties(sqlpp-odbc-static PROPERTIES OUTPUT_NAME sqlpp-odbc)
endif()

install(TARGETS sqlpp-odbc-static DESTINATION lib)
install(TARGETS sqlpp-odbc-shared DESTINATION lib)

0 comments on commit 4c9eb4f

Please sign in to comment.